Class: Syntax::BeforeSection

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/silicon/routing/syntax/before_section.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



3
4
5
# File 'lib/silicon/routing/syntax/before_section.rb', line 3

def commands
  @commands
end

Instance Method Details

#parseObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/silicon/routing/syntax/before_section.rb', line 5

def parse
  @commands = []
  if elements.length > 0
    elements[0].elements.each do |element|
      if element.is_a? Commands
        @commands = element.parse
      end
    end
  end

  self
end