Class: VORuby::ADQL::Comparison

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

Overview

The comparison operators such as Less-than or More-than, etc.

Constant Summary collapse

@@values =
['=', '<>', '>', '>=', '<', '<=']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, values_list = nil) ⇒ Comparison

Returns a new instance of Comparison.



778
779
780
781
# File 'lib/voruby/adql/adql.rb', line 778

def initialize(value, values_list=nil)
	@values_list = values_list || @@values
	self.value = value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



774
775
776
# File 'lib/voruby/adql/adql.rb', line 774

def value
  @value
end

#values_listObject (readonly)

Returns the value of attribute values_list.



774
775
776
# File 'lib/voruby/adql/adql.rb', line 774

def values_list
  @values_list
end

Class Method Details

.from_xml(node) ⇒ Object



796
797
798
# File 'lib/voruby/adql/adql.rb', line 796

def self.from_xml(node)
  return Comparison.new(node.attributes['Comparison'])
end

Instance Method Details

#to_adqlsObject



173
174
175
# File 'lib/voruby/adql/transforms.rb', line 173

def to_adqls
  self.value
end

#to_adqlxObject



177
178
179
# File 'lib/voruby/adql/transforms.rb', line 177

def to_adqlx
  self.value
end

#to_sObject



792
793
794
# File 'lib/voruby/adql/adql.rb', line 792

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