Module: SoftAttributes::Base::ClassMethods
- Defined in:
- lib/soft_attributes/base.rb
Instance Method Summary collapse
Instance Method Details
#soft_attribute(*args) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/soft_attributes/base.rb', line 28 def soft_attribute(*args) = args. attr = args.first .assert_valid_keys(:include_in_xml, :value) __send__(:noop_setter, attr) soft_attributes[attr.to_s] = .slice(:include_in_xml, :value) end |
#soft_attributes ⇒ Object
37 38 39 |
# File 'lib/soft_attributes/base.rb', line 37 def soft_attributes read_inheritable_attribute(:soft_attributes) || write_inheritable_hash(:soft_attributes, {}) end |