Class: ShellOpts::Ast::Program

Inherits:
Command show all
Defined in:
lib/shellopts/ast/program.rb

Instance Attribute Summary collapse

Attributes inherited from Command

#command, #options

Attributes inherited from Node

#grammar, #name

Instance Method Summary collapse

Methods inherited from Command

#dump, #values

Methods inherited from Node

#dump, #key, #to_tuple, #values

Constructor Details

#initialize(grammar) ⇒ Program

Returns a new instance of Program.



8
9
10
11
# File 'lib/shellopts/ast/program.rb', line 8

def initialize(grammar) 
  super(grammar, grammar.name) 
  @arguments = nil
end

Instance Attribute Details

#argumentsObject

Command line arguments. Initially nil but assigned by the parser. This array is the same as the argument array returned by Ast.parse



6
7
8
# File 'lib/shellopts/ast/program.rb', line 6

def arguments
  @arguments
end