Class: VORuby::ADQL::AggregateFunctionName

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

Overview

Enumeration of allowed aggregate functions.

Constant Summary collapse

@@values =
['AVG', 'MIN', 'MAX', 'SUM', 'COUNT']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, values_list = nil) ⇒ AggregateFunctionName

Returns a new instance of AggregateFunctionName.



698
699
700
701
# File 'lib/voruby/adql/adql.rb', line 698

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.



694
695
696
# File 'lib/voruby/adql/adql.rb', line 694

def value
  @value
end

#values_listObject (readonly)

Returns the value of attribute values_list.



694
695
696
# File 'lib/voruby/adql/adql.rb', line 694

def values_list
  @values_list
end

Class Method Details

.from_xml(node) ⇒ Object



716
717
718
# File 'lib/voruby/adql/adql.rb', line 716

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

Instance Method Details

#to_adqlsObject



137
138
139
# File 'lib/voruby/adql/transforms.rb', line 137

def to_adqls
	self.value
end

#to_sObject



712
713
714
# File 'lib/voruby/adql/adql.rb', line 712

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