Class: ShellOpts::Ast::Program
- Defined in:
- lib/shellopts/ast/program.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Command line arguments.
Attributes inherited from Command
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(grammar) ⇒ Program
constructor
A new instance of Program.
Methods inherited from Command
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
#arguments ⇒ Object
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 |