Class: VORuby::ADQL::TrigonometricFunctionName

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

Overview

Enumeration of allowed trigonometric functions.

Constant Summary collapse

@@values =
['SIN', 'COS', 'TAN', 'COT', 'ASIN', 'ACOS', 'ATAN', 'ATAN2']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, values_list = nil) ⇒ TrigonometricFunctionName

Returns a new instance of TrigonometricFunctionName.



544
545
546
547
# File 'lib/voruby/adql/adql.rb', line 544

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.



540
541
542
# File 'lib/voruby/adql/adql.rb', line 540

def value
  @value
end

#values_listObject (readonly)

Returns the value of attribute values_list.



540
541
542
# File 'lib/voruby/adql/adql.rb', line 540

def values_list
  @values_list
end

Class Method Details

.from_xml(node) ⇒ Object



562
563
564
# File 'lib/voruby/adql/adql.rb', line 562

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

Instance Method Details

#to_adqlsObject



105
106
107
# File 'lib/voruby/adql/transforms.rb', line 105

def to_adqls
  self.value
end

#to_sObject



558
559
560
# File 'lib/voruby/adql/adql.rb', line 558

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