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.
107 108 109 110 111 112 |
# File 'lib/red/definition_nodes.rb', line 107 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
118 119 120 121 122 123 124 |
# File 'lib/red/definition_nodes.rb', line 118 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
114 115 116 |
# File 'lib/red/definition_nodes.rb', line 114 def compile_node( = {}) return "%s" % self.compile_internals end |