Class: Red::DefinitionNode::ModuleNode
- Inherits:
-
Object
- Object
- Red::DefinitionNode::ModuleNode
- Defined in:
- lib/red/definition_nodes.rb
Overview
:nodoc:
Instance Method Summary collapse
- #compile_internals(options = {}) ⇒ Object
- #compile_node(options = {}) ⇒ Object
-
#initialize(module_name, scope) ⇒ ModuleNode
constructor
A new instance of ModuleNode.
Constructor Details
#initialize(module_name, scope) ⇒ ModuleNode
Returns a new instance of ModuleNode.
125 126 127 128 129 130 |
# File 'lib/red/definition_nodes.rb', line 125 def initialize(module_name, scope) old_module = @@red_module @@red_module = module_name @module_name, @scope = [module_name, scope].build_nodes @@red_module = old_module end |
Instance Method Details
#compile_internals(options = {}) ⇒ Object
136 137 138 139 140 141 142 |
# File 'lib/red/definition_nodes.rb', line 136 def compile_internals( = {}) old_module = @@red_module @@red_module = @module_name.compile_node scope = @scope.compile_node @@red_module = old_module return [scope] end |
#compile_node(options = {}) ⇒ Object
132 133 134 |
# File 'lib/red/definition_nodes.rb', line 132 def compile_node( = {}) return "%s" % self.compile_internals end |