Class: Color
- Inherits:
-
Object
- Object
- Color
- Defined in:
- lib/color.rb
Instance Attribute Summary collapse
-
#alpha ⇒ Object
Returns the value of attribute alpha.
-
#blue ⇒ Object
Returns the value of attribute blue.
-
#green ⇒ Object
Returns the value of attribute green.
-
#red ⇒ Object
Returns the value of attribute red.
Instance Method Summary collapse
-
#initialize(red = 0, green = 0, blue = 0, alpha = 255) ⇒ Color
constructor
A new instance of Color.
- #set(arg1, green = nil, blue = nil, alpha = 255) ⇒ Object
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
#alpha ⇒ Object
Returns the value of attribute alpha.
17 18 19 |
# File 'lib/color.rb', line 17 def alpha @alpha end |
#blue ⇒ Object
Returns the value of attribute blue.
15 16 17 |
# File 'lib/color.rb', line 15 def blue @blue end |
#green ⇒ Object
Returns the value of attribute green.
13 14 15 |
# File 'lib/color.rb', line 13 def green @green end |
#red ⇒ Object
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 |