Class: Poppler::Color
- Inherits:
-
Object
- Object
- Poppler::Color
- Defined in:
- lib/poppler/color.rb
Instance Method Summary collapse
-
#initialize(red, green, blue) ⇒ Color
constructor
A new instance of Color.
- #initialize_raw ⇒ Object
- #inspect ⇒ Object
- #inspect_raw ⇒ Object
- #to_a ⇒ Object
Constructor Details
#initialize(red, green, blue) ⇒ Color
Returns a new instance of Color.
20 21 22 23 24 25 |
# File 'lib/poppler/color.rb', line 20 def initialize(red, green, blue) initialize_raw self.red = red self.green = green self.blue = blue end |
Instance Method Details
#initialize_raw ⇒ Object
19 |
# File 'lib/poppler/color.rb', line 19 alias_method :initialize_raw, :initialize |
#inspect ⇒ Object
32 33 34 |
# File 'lib/poppler/color.rb', line 32 def inspect inspect_raw[0..-2] + ": [#{to_a.join(", ")}]>" end |
#inspect_raw ⇒ Object
31 |
# File 'lib/poppler/color.rb', line 31 alias_method :inspect_raw, :inspect |
#to_a ⇒ Object
27 28 29 |
# File 'lib/poppler/color.rb', line 27 def to_a [red, green, blue] end |