Class: RXaal::NamedColor
- Inherits:
-
GenericColor
- Object
- GenericColor
- RXaal::NamedColor
- Defined in:
- lib/named_color.rb
Instance Method Summary collapse
-
#initialize(_name) ⇒ NamedColor
constructor
A new instance of NamedColor.
-
#xaal_serialize(parent) ⇒ Object
must be style object.
Constructor Details
#initialize(_name) ⇒ NamedColor
Returns a new instance of NamedColor.
5 6 7 8 |
# File 'lib/named_color.rb', line 5 def initialize(_name) super() @name = _name end |
Instance Method Details
#xaal_serialize(parent) ⇒ Object
must be style object
10 11 12 13 14 |
# File 'lib/named_color.rb', line 10 def xaal_serialize(parent) elem = Element.new "color" elem.attributes["name"] = @name parent.elements << elem end |