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.
2091 2092 2093 |
# File 'lib/voruby/adql/adql.rb', line 2091 def initialize(tables) self.tables = tables end |
Instance Attribute Details
#tables ⇒ Object
Returns the value of attribute tables.
2089 2090 2091 |
# File 'lib/voruby/adql/adql.rb', line 2089 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
2105 2106 2107 2108 |
# File 'lib/voruby/adql/adql.rb', line 2105 def to_s tables = self.tables.collect{|x| x.to_s}.join('|') "{tables=#{tables}}" end |