Class: Subconv::ColorNode
- Inherits:
-
ContainerNode
- Object
- CaptionNode
- ContainerNode
- Subconv::ColorNode
- Defined in:
- lib/subconv/caption.rb
Overview
Color style node
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
Attributes inherited from ContainerNode
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(color, children = []) ⇒ ColorNode
constructor
Color should be given as symbol, e.g.
Constructor Details
#initialize(color, children = []) ⇒ ColorNode
Color should be given as symbol, e.g. :white, :red, :blue, …
82 83 84 85 |
# File 'lib/subconv/caption.rb', line 82 def initialize(color, children = []) super children @color = color end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
91 92 93 |
# File 'lib/subconv/caption.rb', line 91 def color @color end |
Instance Method Details
#==(other) ⇒ Object
87 88 89 |
# File 'lib/subconv/caption.rb', line 87 def ==(other) super(other) && @color == other.color end |