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, …



77
78
79
80
# File 'lib/subconv/caption.rb', line 77

def initialize(color, children = [])
  super children
  @color = color
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



86
87
88
# File 'lib/subconv/caption.rb', line 86

def color
  @color
end

Instance Method Details

#==(other) ⇒ Object



82
83
84
# File 'lib/subconv/caption.rb', line 82

def ==(other)
  super(other) && @color == other.color
end