class Twb::JoinTable

Attributes

children[RW]
datasource[R]
depth[RW]
name[R]

Public Class Methods

new(name, datasource=nil) click to toggle source
# File lib/twb/datasource.rb, line 626
def initialize(name, datasource=nil)
  @name       = name
  @datasource = datasource
  # @str        = nil
  @children   = {}
  @depth      = 0
end

Public Instance Methods

<=>(anOther) click to toggle source
# File lib/twb/datasource.rb, line 640
def <=>(anOther)
  @str <=> anOther.str
end
addChild(child) click to toggle source
# File lib/twb/datasource.rb, line 644
def addChild child
  # puts  "#{@name}.addChild(#{child.name})"
  # puts  "children: #{@children}"
  @children[child.name] = child if @children[child.name].nil?
  # puts  "children: #{@children}"
end
child(name) click to toggle source
# File lib/twb/datasource.rb, line 651
def child name
  @children[name]
end
to_s() click to toggle source
# File lib/twb/datasource.rb, line 634
def to_s
  str = "[#{@datasource}].[#{@name}] :: (#{@depth}) :: #{@children.length} :: "
  @children.each { |n,c| str << "#{n}, " }
  return str
end