Module: Jaso::Attributable::ClassMethods
- Defined in:
- lib/jaso/attributable.rb
Instance Method Summary collapse
Instance Method Details
#__attributes ⇒ Object
10 11 12 |
# File 'lib/jaso/attributable.rb', line 10 def __attributes @__attributes ||= {} end |
#attribute(name, **options) ⇒ Object
14 15 16 17 |
# File 'lib/jaso/attributable.rb', line 14 def attribute(name, **) __attributes[name] = private define_method(name) { __attributes[name] } end |