Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.24 KB | None | 0 0
  1. class A
  2.   def initialize(scope)
  3.     # scope can eq :a or :b
  4.     @scope = scope
  5.   end
  6.  
  7.   def get_scope
  8.     get_scope(@scope)
  9.   end
  10. end
  11.  
  12. class B
  13.   def get_scope_a
  14.     get_scope(:a)
  15.   end
  16.  
  17.   def get_scope_b
  18.     get_scope(:b)
  19.   end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement