Class: Orbacle::ConstantsTree::ScopeLevel

Inherits:
Struct
  • Object
show all
Defined in:
lib/orbacle/constants_tree.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



5
6
7
# File 'lib/orbacle/constants_tree.rb', line 5

def children
  @children
end

#elementsObject

Returns the value of attribute elements

Returns:

  • (Object)

    the current value of elements



5
6
7
# File 'lib/orbacle/constants_tree.rb', line 5

def elements
  @elements
end

Class Method Details

.build_empty_hashObject



10
11
12
# File 'lib/orbacle/constants_tree.rb', line 10

def self.build_empty_hash
  Hash.new {|h, k| h[k] = ScopeLevel.empty }
end

.emptyObject



6
7
8
# File 'lib/orbacle/constants_tree.rb', line 6

def self.empty
  new([], build_empty_hash)
end