Class: Horza::Entities::Single
- Inherits:
-
Hash
- Object
- Hash
- Horza::Entities::Single
- Extended by:
- ActiveSupport::DescendantsTracker
- Includes:
- Hashie::Extensions::MethodAccess
- Defined in:
- lib/horza/entities/single.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#generic_getter(name) ⇒ Object
(also: #read_attribute_for_serialization)
Some libraries (ie. ActiveModel serializer) use their own methods to access attributes These are aliased to the generic_getter.
-
#initialize(attributes) ⇒ Single
constructor
A new instance of Single.
Constructor Details
#initialize(attributes) ⇒ Single
9 10 11 |
# File 'lib/horza/entities/single.rb', line 9 def initialize(attributes) update(attributes) end |
Instance Method Details
#generic_getter(name) ⇒ Object Also known as: read_attribute_for_serialization
Some libraries (ie. ActiveModel serializer) use their own methods to access attributes These are aliased to the generic_getter
15 16 17 |
# File 'lib/horza/entities/single.rb', line 15 def generic_getter(name) send(name) end |