Class: VORuby::ADQL::ArrayOfFromTable
- 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
-
#from_tables ⇒ Object
Returns the value of attribute from_tables.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tables) ⇒ ArrayOfFromTable
constructor
A new instance of ArrayOfFromTable.
- #to_adqls ⇒ Object
- #to_s ⇒ Object
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_tables ⇒ Object
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_adqls ⇒ Object
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_s ⇒ Object
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 |