Class: Melbourne::AST::Container

Inherits:
ClosedScope show all
Defined in:
lib/melbourne/ast/definitions.rb

Overview

TODO: document!

Direct Known Subclasses

EvalExpression, Script, Snippit

Instance Attribute Summary collapse

Attributes inherited from ClosedScope

#body

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(body) ⇒ Container

Returns a new instance of Container.



506
507
508
# File 'lib/melbourne/ast/definitions.rb', line 506

def initialize(body)
  @body = body || Nil.new(1)
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



504
505
506
# File 'lib/melbourne/ast/definitions.rb', line 504

def file
  @file
end

#nameObject

Returns the value of attribute name.



504
505
506
# File 'lib/melbourne/ast/definitions.rb', line 504

def name
  @name
end

#variable_scopeObject

Returns the value of attribute variable_scope.



504
505
506
# File 'lib/melbourne/ast/definitions.rb', line 504

def variable_scope
  @variable_scope
end