Module: Attributable
- Defined in:
- lib/attributable.rb,
lib/attributable/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
Instance Method Details
#attributes(*without_defaults, **with_defaults) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/attributable.rb', line 4 def attributes(*without_defaults, **with_defaults) @attributes ||= {} @attributes.merge!(attributes_from(superclass)) if respond_to?(:superclass) @attributes.merge!(attributes_from(*included_modules)) @attributes.merge!(from(without_defaults, with_defaults)) add_instance_methods(@attributes) end |