Class: VORuby::ADQL::UnaryOperator

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

Overview

Operators for expressing a single element operation.

Constant Summary collapse

@@operators =
['+', '-']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operator, op_list = nil) ⇒ UnaryOperator

Returns a new instance of UnaryOperator.



214
215
216
217
# File 'lib/voruby/adql/adql.rb', line 214

def initialize(operator, op_list=nil)
	@op_list = op_list || @@operators
	self.operator = operator
end

Instance Attribute Details

#operatorObject

Returns the value of attribute operator.



210
211
212
# File 'lib/voruby/adql/adql.rb', line 210

def operator
  @operator
end

Instance Method Details

#to_adqlsObject



32
33
34
# File 'lib/voruby/adql/transforms.rb', line 32

def to_adqls
	self.operator
end

#to_sObject



228
229
230
# File 'lib/voruby/adql/adql.rb', line 228

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