Class: VORuby::ADQL::ArrayOfFromTable

Inherits:
Object
  • Object
show all
Defined in:
lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb

Overview

Represents an array of tables in the from expression.def expression.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tables) ⇒ ArrayOfFromTable

Returns a new instance of ArrayOfFromTable.



2702
2703
2704
# File 'lib/voruby/adql/adql.rb', line 2702

def initialize(tables)
  self.from_tables = tables
end

Instance Attribute Details

#from_tablesObject

Returns the value of attribute from_tables.



2700
2701
2702
# File 'lib/voruby/adql/adql.rb', line 2700

def from_tables
  @from_tables
end

Class Method Details

.from_xml(node) ⇒ Object



2723
2724
2725
2726
2727
2728
2729
2730
# File 'lib/voruby/adql/adql.rb', line 2723

def self.from_xml(node)
  from_tables = []
  node.elements.to_a('Table').each do |ftbl|
    from_tables.push(FromTable.from_xml(ftbl))
  end

  return ArrayOfFromTable.new(from_tables)
end

Instance Method Details

#to_adqlsObject



561
562
563
# File 'lib/voruby/adql/transforms.rb', line 561

def to_adqls
  self.from_tables.collect{|x| x.to_adqls}.join(', ')
end

#to_sObject



2718
2719
2720
2721
# File 'lib/voruby/adql/adql.rb', line 2718

def to_s
  tables = self.from_tables.collect{|x| x.to_s}.join('|')
  "{from_tables=#{tables}}"
end