daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class SomeClass
  2.   def some_method
  3.     @ivar = "this is ivar"
  4.     self.class.send(:attr_reader, :ivar)
  5.   end
  6. end
  7.  
  8. a = SomeClass.new
  9. a.some_method
  10. p a.ivar
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top