class StatSailr::Output::OutputManager

Attributes

root_node[RW]

Public Class Methods

new( capture: true ) click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 114
def initialize( capture: true )
  @root_node = OutputNode.new("root", self)
  @current_node = @root_node
  @capture = capture
end

Public Instance Methods

add_new_message( type, content: "" ) click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 141
def add_new_message( type, content: "" )
  message = @current_node.new_message(type, content)
  return message
end
move_down() click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 154
def move_down()
  if @current_node.children.size >= 1
    @current_node = @current_node.children.last
  else
    return nil
  end
end
move_to_new_node(tag) click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 126
def move_to_new_node(tag)
  @current_node = @current_node.new_node(tag)
  return @current_node
end
move_to_root() click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 146
def move_to_root()
  @current_node = @root_node
end
move_up() click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 150
def move_up()
  @current_node = @current_node.parent
end
recurse_move_to_new_node(tag , *tags) click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 131
def recurse_move_to_new_node(tag , *tags)
  @current_node = @current_node.new_node(tag)
  if ! tags.nil?
    tags.each(){|child_tag|
      @current_node = @current_node.new_node(child_tag)
    }
  end
  return @current_node
end
reset() click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 120
def reset
  @root_node = OutputNode.new("root", self)
  @current_node = @root_node
  return self
end
to_s() click to toggle source
# File lib/statsailr/sts_output/output_manager.rb, line 162
def to_s()
  @root_node.to_s()
end