Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/core-extensions/object_ext.rb
Instance Method Summary collapse
Instance Method Details
#define_attribute(sym, value) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/core-extensions/object_ext.rb', line 2 def define_attribute(sym, value) (class << self; self; end).class_eval do define_method(sym) { value } end value end |