Class: Fauve::Scheme::Colour
- Inherits:
-
Object
- Object
- Fauve::Scheme::Colour
- Defined in:
- lib/fauve/scheme/colour.rb
Overview
Representation of a colour as part of a wider scheme. Holds a raw colour and a colour with filters applied. Requires Fauve::Scheme::ColourMap, Fauve::Scheme::Section and Fauve::Scheme::Reference
Constant Summary collapse
- @@candidates =
[]
Instance Attribute Summary collapse
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#raw_colour ⇒ Object
readonly
Returns the value of attribute raw_colour.
Instance Method Summary collapse
- #colour ⇒ Object
-
#initialize(section, reference) ⇒ Colour
constructor
A new instance of Colour.
Constructor Details
#initialize(section, reference) ⇒ Colour
Returns a new instance of Colour.
15 16 17 18 19 20 21 22 |
# File 'lib/fauve/scheme/colour.rb', line 15 def initialize(section, reference) @colour_map = ColourMap.instance @section = section @reference = reference @candidate = operations.shift @filters = operations @raw_colour = determine_raw_colour end |
Instance Attribute Details
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
13 14 15 |
# File 'lib/fauve/scheme/colour.rb', line 13 def filters @filters end |
#raw_colour ⇒ Object (readonly)
Returns the value of attribute raw_colour.
13 14 15 |
# File 'lib/fauve/scheme/colour.rb', line 13 def raw_colour @raw_colour end |
Instance Method Details
#colour ⇒ Object
24 25 26 |
# File 'lib/fauve/scheme/colour.rb', line 24 def colour raw_colour end |