Module: ResultClassComponents::Accessors
- Defined in:
- lib/kweerie/result_class_components/accessors.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #fetch(key, default = nil) ⇒ Object
- #original_attributes ⇒ Object
- #raw_original_attributes ⇒ Object
Instance Method Details
#[](key) ⇒ Object
5 6 7 |
# File 'lib/kweerie/result_class_components/accessors.rb', line 5 def [](key) instance_variable_get("@#{key}") end |
#fetch(key, default = nil) ⇒ Object
9 10 11 |
# File 'lib/kweerie/result_class_components/accessors.rb', line 9 def fetch(key, default = nil) instance_variable_defined?("@#{key}") ? instance_variable_get("@#{key}") : default end |
#original_attributes ⇒ Object
13 14 15 |
# File 'lib/kweerie/result_class_components/accessors.rb', line 13 def original_attributes @_original_attributes end |
#raw_original_attributes ⇒ Object
17 18 19 |
# File 'lib/kweerie/result_class_components/accessors.rb', line 17 def raw_original_attributes @_raw_original_attributes end |