Class: Color

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(red = 0, green = 0, blue = 0, alpha = 255) ⇒ Color

Returns a new instance of Color.



3
4
5
# File 'lib/color.rb', line 3

def initialize(red = 0, green = 0, blue = 0, alpha = 255)
  fail NotImplementedError
end

Instance Attribute Details

#alphaObject

Returns the value of attribute alpha.



17
18
19
# File 'lib/color.rb', line 17

def alpha
  @alpha
end

#blueObject

Returns the value of attribute blue.



15
16
17
# File 'lib/color.rb', line 15

def blue
  @blue
end

#greenObject

Returns the value of attribute green.



13
14
15
# File 'lib/color.rb', line 13

def green
  @green
end

#redObject

Returns the value of attribute red.



11
12
13
# File 'lib/color.rb', line 11

def red
  @red
end

Instance Method Details

#set(arg1, green = nil, blue = nil, alpha = 255) ⇒ Object



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

def set(arg1, green = nil, blue = nil, alpha = 255)
  fail NotImplementedError
end