class Talk::RegistryEntry
Attributes
file[R]
line[R]
name[R]
Public Class Methods
new(name=nil, file=nil, line=nil)
click to toggle source
# File lib/registry.rb, line 13 def initialize(name=nil, file=nil, line=nil) @file = file @line = line @name = name @children = {} end
Public Instance Methods
[](key)
click to toggle source
# File lib/registry.rb, line 26 def [](key) @children[key] end
[]=(key, value)
click to toggle source
# File lib/registry.rb, line 30 def []=(key, value) @children[key] = value end
each(&block)
click to toggle source
# File lib/registry.rb, line 38 def each(&block) @children.each &block end
has_children?()
click to toggle source
# File lib/registry.rb, line 42 def has_children? not @children.empty? end
is_entry?()
click to toggle source
# File lib/registry.rb, line 46 def is_entry? @file != nil end
keys()
click to toggle source
# File lib/registry.rb, line 34 def keys @children.keys end
make_entry(name, file, line)
click to toggle source
# File lib/registry.rb, line 20 def make_entry(name, file, line) @name = name @file = file @line = line end
to_s()
click to toggle source
# File lib/registry.rb, line 50 def to_s is_entry? ? "#{@file}:#{@line}" : "container" end