Class: Fotolia::Color

Inherits:
Object
  • Object
show all
Defined in:
lib/fotolia/color.rb

Overview

Represents a color at Fotolia.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/fotolia/color.rb', line 6

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/fotolia/color.rb', line 7

def name
  @name
end