Class: Jets::Resource::Associated
- Inherits:
-
Object
- Object
- Jets::Resource::Associated
- Extended by:
- Memoist
- Defined in:
- lib/jets/resource/associated.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(*definition) ⇒ Associated
constructor
A new instance of Associated.
- #logical_id ⇒ Object
- #standardized ⇒ Object
Constructor Details
#initialize(*definition) ⇒ Associated
Returns a new instance of Associated.
8 9 10 |
# File 'lib/jets/resource/associated.rb', line 8 def initialize(*definition) @definition = definition.flatten end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
7 8 9 |
# File 'lib/jets/resource/associated.rb', line 7 def definition @definition end |
Instance Method Details
#attributes ⇒ Object
16 17 18 |
# File 'lib/jets/resource/associated.rb', line 16 def attributes standardized.values.first end |
#logical_id ⇒ Object
12 13 14 |
# File 'lib/jets/resource/associated.rb', line 12 def logical_id standardized.keys.first end |
#standardized ⇒ Object
20 21 22 23 |
# File 'lib/jets/resource/associated.rb', line 20 def standardized standardizer = Standardizer.new(definition) standardizer.standarize(definition) # doesnt camelize keys yet end |