Class: VORuby::ADQL::SelectionLimit

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

Overview

Represents the TOP part of a query.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(top) ⇒ SelectionLimit

Returns a new instance of SelectionLimit.



2241
2242
2243
# File 'lib/voruby/adql/adql.rb', line 2241

def initialize(top)
  self.top = top
end

Instance Attribute Details

#topObject

Returns the value of attribute top.



2239
2240
2241
# File 'lib/voruby/adql/adql.rb', line 2239

def top
  @top
end

Class Method Details

.from_xml(node) ⇒ Object



2254
2255
2256
2257
# File 'lib/voruby/adql/adql.rb', line 2254

def self.from_xml(node)
  top = node.attributes['Top'].to_i
  return SelectionLimit.new(top)
end

Instance Method Details

#to_adqlsObject



436
437
438
# File 'lib/voruby/adql/transforms.rb', line 436

def to_adqls
  "TOP #{self.top}"
end

#to_sObject



2250
2251
2252
# File 'lib/voruby/adql/adql.rb', line 2250

def to_s
  "{top=#{self.top}}"
end