Class: RXaal::RGBColor

Inherits:
GenericColor show all
Defined in:
lib/rgb_color.rb

Instance Method Summary collapse

Constructor Details

#initialize(_r, _g, _b) ⇒ RGBColor

Returns a new instance of RGBColor.



5
6
7
8
9
10
# File 'lib/rgb_color.rb', line 5

def initialize(_r, _g, _b)
  super
  @r = _r
  @g = _g
  @b = _b
end

Instance Method Details

#xaal_serialize(parent) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/rgb_color.rb', line 12

def xaal_serialize(parent)
  elem = Element.new "color"
  elem.attributes['r'] = r
  elem.attributes['g'] = g
  elem.attributes["b"] = b
  parent.elements << elem
end