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.



2189
2190
2191
# File 'lib/voruby/adql/adql.rb', line 2189

def initialize(top)
  self.top = top
end

Instance Attribute Details

#topObject

Returns the value of attribute top.



2187
2188
2189
# File 'lib/voruby/adql/adql.rb', line 2187

def top
  @top
end

Class Method Details

.from_xml(node) ⇒ Object



2202
2203
2204
2205
# File 'lib/voruby/adql/adql.rb', line 2202

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



2198
2199
2200
# File 'lib/voruby/adql/adql.rb', line 2198

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