class Rubinius::ConstantScope

Attributes

is_myco_level[R]
myco_category[R]
myco_component[R]
myco_file[R]
myco_meme[R]

Public Instance Methods

get_myco_constant_ref(name) click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 75
def get_myco_constant_ref(name)
  @myco_constant_refs ||= Rubinius::LookupTable.new
  @myco_constant_refs[name] ||= ::Myco::ConstantReference.new(name, self)
end
inspect() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 16
def inspect
  "#<#{self.class}:#{inspect_list}>"
end
inspect_list() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 11
def inspect_list
  this_item = "0x#{object_id.to_s(16)} #{self.module}"
  parent ? "#{this_item}, #{parent.inspect_list}" : this_item
end
myco_levels() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 25
def myco_levels
  @myco_levels ||= (parent ? parent.myco_levels.dup : [])
end
myco_parent() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 29
def myco_parent
  parent = parent()
  parent ? (
    parent.is_myco_level ? parent : parent.myco_parent
  ) : nil
end
set_myco_category() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 58
def set_myco_category
  raise "myco_category already set for thie ConstantScope" \
    if @myco_category
  @myco_category  = self.module
  @myco_component = parent.myco_component
  @myco_file      = parent.myco_file
  
  myco_levels << @myco_category
  @is_myco_level = true
end
set_myco_component() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 48
def set_myco_component
  raise "myco_component already set for thie ConstantScope" \
    if @myco_component
  @myco_component = self.module
  @myco_file      = parent.myco_file
  
  myco_levels << @myco_component
  @is_myco_level = true
end
set_myco_file() click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 36
def set_myco_file
  raise "myco_file already set for thie ConstantScope" \
    if @myco_file
  @myco_component = self.module
  @myco_file      = self.module
  
  @myco_file.instance_variable_set(:@constant_scope, self)
  
  myco_levels << @myco_file
  @is_myco_level = true
end
set_myco_meme(value) click to toggle source
# File lib/myco/bootstrap/find_constant.rb, line 69
def set_myco_meme value
  raise "myco_meme already set for thie ConstantScope" \
    if @myco_meme
  @myco_meme      = value
end