Class: ShellOpts::Grammar::Section
- Defined in:
- lib/shellopts/grammar.rb
Constant Summary
Constants inherited from Node
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(parent, token) ⇒ Section
constructor
A new instance of Section.
- #name ⇒ Object
Methods inherited from Node
#analyzer_error, #ancestors, #dump_ast, #dump_attrs, #dump_idr, #inspect, #parents, #parse, parse, #parser_error, #puts_help, #puts_usage, #remove_arg_descr_nodes, #remove_arg_spec_nodes, #remove_brief_nodes, #traverse
Constructor Details
#initialize(parent, token) ⇒ Section
Returns a new instance of Section.
365 366 367 368 |
# File 'lib/shellopts/grammar.rb', line 365 def initialize(parent, token) constrain token.source, *%w(DESCRIPTION OPTION COMMAND) super end |
Instance Method Details
#name ⇒ Object
369 |
# File 'lib/shellopts/grammar.rb', line 369 def name() token.source end |