Class: VORuby::ADQL::MathFunctionName

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

Overview

Enumeration of allowed math functions.

Constant Summary collapse

@@values =
['ABS', 'CEILING', 'DEGREES', 'EXP', 'FLOOR', 'LOG',
'PI', 'POWER', 'RADIANS', 'SQRT', 'SQUARE', 'LOG10',
'RAND', 'ROUND', 'TRUNCATE']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, values_list = nil) ⇒ MathFunctionName

Returns a new instance of MathFunctionName.



622
623
624
625
# File 'lib/voruby/adql/adql.rb', line 622

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.



616
617
618
# File 'lib/voruby/adql/adql.rb', line 616

def value
  @value
end

#values_listObject (readonly)

Returns the value of attribute values_list.



616
617
618
# File 'lib/voruby/adql/adql.rb', line 616

def values_list
  @values_list
end

Class Method Details

.from_xml(node) ⇒ Object



640
641
642
# File 'lib/voruby/adql/adql.rb', line 640

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

Instance Method Details

#to_adqlsObject



121
122
123
# File 'lib/voruby/adql/transforms.rb', line 121

def to_adqls
	self.value
end

#to_sObject



636
637
638
# File 'lib/voruby/adql/adql.rb', line 636

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