class Megingiard::ColorNode

A node that colors all its children in a given color

Public Class Methods

new(color_name, child) click to toggle source
# File lib/megingiard/color_node.rb, line 7
def initialize(color_name, child)
  @color_sequence = TextColorSequence.new(color_name)
  @child = child
end

Public Instance Methods

to_s() click to toggle source
# File lib/megingiard/color_node.rb, line 12
def to_s
  "#{@color_sequence}#{@child}#{RESET_SEQUENCE}"
end