Method: Lemo::Ormo::ClassMethods#ivar_from

Defined in:
lib/lemo/ormo.rb

#ivar_from(meth) ⇒ Object

provide a legal ivar name from a method name. instance variables can’t have ? ! and other punctuation. Which isn’t handled. Obviously. WARNING meth, meth? and meth! will access the same ivar.



19
20
21
# File 'lib/lemo/ormo.rb', line 19

def ivar_from( meth )
  :"@#{meth.to_s.delete ILLEGAL_IVAR_CHARS}"
end