Class: Horza::Entities::Single
- Inherits:
-
Hash
- Object
- Hash
- Horza::Entities::Single
- 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
Returns a new instance of Single.
8 9 10 |
# File 'lib/horza/entities/single.rb', line 8 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
14 15 16 |
# File 'lib/horza/entities/single.rb', line 14 def generic_getter(name) send(name) end |