Class: VORuby::ADQL::From
- Defined in:
- lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb
Overview
Represents the From part of the query.
Instance Attribute Summary collapse
-
#tables ⇒ Object
Returns the value of attribute tables.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tables) ⇒ From
constructor
A new instance of From.
- #to_adqls ⇒ Object
- #to_adqlx ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(tables) ⇒ From
Returns a new instance of From.
2143 2144 2145 |
# File 'lib/voruby/adql/adql.rb', line 2143 def initialize(tables) self.tables = tables end |
Instance Attribute Details
#tables ⇒ Object
Returns the value of attribute tables.
2141 2142 2143 |
# File 'lib/voruby/adql/adql.rb', line 2141 def tables @tables end |
Class Method Details
Instance Method Details
#to_adqls ⇒ Object
407 408 409 410 |
# File 'lib/voruby/adql/transforms.rb', line 407 def to_adqls tables = self.tables.collect{|x| x.to_adqls}.join(', ') "FROM #{tables}" end |
#to_adqlx ⇒ Object
412 413 414 415 416 417 418 |
# File 'lib/voruby/adql/transforms.rb', line 412 def to_adqlx from = "<From>\n" from << self.tables.collect{|x| x.to_adqlx}.join("\n") from << "\n</From>\n" return from end |
#to_s ⇒ Object
2157 2158 2159 2160 |
# File 'lib/voruby/adql/adql.rb', line 2157 def to_s tables = self.tables.collect{|x| x.to_s}.join('|') "{tables=#{tables}}" end |