Class: Treetop::Compiler::InlineModule
- Inherits:
-
Runtime::SyntaxNode
- Object
- Runtime::SyntaxNode
- Treetop::Compiler::InlineModule
- Includes:
- InlineModuleMixin
- Defined in:
- lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/compiler/node_classes/inline_module.rb
Instance Attribute Summary
Attributes included from InlineModuleMixin
Attributes inherited from Runtime::SyntaxNode
Instance Method Summary collapse
Methods inherited from Runtime::SyntaxNode
#<=>, #dot_id, #elements, #empty?, #extension_modules, #initialize, #inspect, #inspect_children, #inspect_self, #nonterminal?, #terminal?, #text_value, #write_dot, #write_dot_file
Constructor Details
This class inherits a constructor from Treetop::Runtime::SyntaxNode
Instance Method Details
#compile(index, builder, rule) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/compiler/node_classes/inline_module.rb', line 15 def compile(index, builder, rule) super builder.module_declaration(module_name) do builder << ruby_code.gsub(/\A\n/, '').rstrip end end |
#ruby_code ⇒ Object
22 23 24 |
# File 'lib/puppet_x/wildfly/gems/treetop-1.6.8/lib/treetop/compiler/node_classes/inline_module.rb', line 22 def ruby_code elements[1].text_value end |