Class: Ravelry::ColorFamily
- Inherits:
-
Object
- Object
- Ravelry::ColorFamily
- Defined in:
- lib/ravelry/color_family.rb
Overview
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#spectrum_order ⇒ Object
readonly
Returns the value of attribute spectrum_order.
Instance Method Summary collapse
-
#initialize(color_family) ⇒ ColorFamily
constructor
Creates new ‘ColorFamily` from Ravelry API ColorFamily attributes.
Constructor Details
#initialize(color_family) ⇒ ColorFamily
Creates new ‘ColorFamily` from Ravelry API ColorFamily attributes.
All class variables are readonly.
14 15 16 17 18 19 20 |
# File 'lib/ravelry/color_family.rb', line 14 def initialize(color_family) @id = color_family[:id] @color = color_family[:color] @permalink = color_family[:permalink] @name = color_family[:name] @spectrum_order = color_family[:spectrum_order] end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
8 9 10 |
# File 'lib/ravelry/color_family.rb', line 8 def color @color end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/ravelry/color_family.rb', line 8 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/ravelry/color_family.rb', line 8 def name @name end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
8 9 10 |
# File 'lib/ravelry/color_family.rb', line 8 def permalink @permalink end |
#spectrum_order ⇒ Object (readonly)
Returns the value of attribute spectrum_order.
8 9 10 |
# File 'lib/ravelry/color_family.rb', line 8 def spectrum_order @spectrum_order end |