Class: VORuby::ADQL::SelectionOption

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

Overview

Option of selecting all or distinct elements in a query.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(option) ⇒ SelectionOption

Returns a new instance of SelectionOption.



438
439
440
# File 'lib/voruby/adql/adql.rb', line 438

def initialize(option)
	self.option = option
end

Instance Attribute Details

#optionObject

Returns the value of attribute option.



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

def option
  @option
end

Class Method Details

.from_xml(node) ⇒ Object



460
461
462
463
# File 'lib/voruby/adql/adql.rb', line 460

def self.from_xml(node)
  option = AllOrDistinct.new(node.attributes['Option'])
  return SelectionOption.new(option)
end

Instance Method Details

#contentObject



452
453
454
# File 'lib/voruby/adql/adql.rb', line 452

def content
	self.option.option
end

#to_adqlsObject



93
94
95
# File 'lib/voruby/adql/transforms.rb', line 93

def to_adqls
	self.option.option
end

#to_sObject



456
457
458
# File 'lib/voruby/adql/adql.rb', line 456

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