Class: RubyUIConverter::Nodes::Branch

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_ui_converter/nodes.rb

Overview

A single branch of a control structure (if / elsif / else / when / each-do…).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(header:) ⇒ Branch

Returns a new instance of Branch.



110
111
112
113
# File 'lib/ruby_ui_converter/nodes.rb', line 110

def initialize(header:)
  @header = header
  @children = []
end

Instance Attribute Details

#childrenObject (readonly)

Returns the value of attribute children.



108
109
110
# File 'lib/ruby_ui_converter/nodes.rb', line 108

def children
  @children
end

#headerObject (readonly)

Returns the value of attribute header.



108
109
110
# File 'lib/ruby_ui_converter/nodes.rb', line 108

def header
  @header
end