Module: NoBrainer::Document::DynamicAttributes
- Extended by:
- ActiveSupport::Concern
- Included in:
- System::Document
- Defined in:
- lib/no_brainer/document/dynamic_attributes.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#read_attribute(name) ⇒ Object
4 5 6 |
# File 'lib/no_brainer/document/dynamic_attributes.rb', line 4 def read_attribute(name) self.respond_to?("#{name}") ? super : _read_attribute(name) end |
#readable_attributes ⇒ Object
12 13 14 |
# File 'lib/no_brainer/document/dynamic_attributes.rb', line 12 def readable_attributes @_attributes.keys end |
#write_attribute(name, value) ⇒ Object
8 9 10 |
# File 'lib/no_brainer/document/dynamic_attributes.rb', line 8 def write_attribute(name, value) self.respond_to?("#{name}=") ? super : _write_attribute(name, value) end |