Class: Fotolia::Color
- Inherits:
-
Object
- Object
- Fotolia::Color
- Defined in:
- lib/fotolia/color.rb
Overview
Represents a color at Fotolia.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Color
constructor
A new instance of Color.
Constructor Details
#initialize(attributes) ⇒ Color
Returns a new instance of Color.
9 10 11 12 |
# File 'lib/fotolia/color.rb', line 9 def initialize(attributes) @id = attributes[:id] @name = attributes[:name] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/fotolia/color.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/fotolia/color.rb', line 7 def name @name end |