Class: Subconv::ColorNode

Inherits:
ContainerNode show all
Defined in:
lib/subconv/caption.rb

Overview

Color style node

Instance Attribute Summary collapse

Attributes inherited from ContainerNode

#children

Instance Method Summary collapse

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

#colorObject

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