Class: Poppler::Color

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

Instance Method Summary collapse

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_rawObject



19
# File 'lib/poppler/color.rb', line 19

alias_method :initialize_raw, :initialize

#inspectObject



32
33
34
# File 'lib/poppler/color.rb', line 32

def inspect
  inspect_raw[0..-2] + ": [#{to_a.join(", ")}]>"
end

#inspect_rawObject



31
# File 'lib/poppler/color.rb', line 31

alias_method :inspect_raw, :inspect

#to_aObject



27
28
29
# File 'lib/poppler/color.rb', line 27

def to_a
  [red, green, blue]
end