Class: VORuby::ADQL::BinaryOperator

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

Overview

Used for expressing operations like A+B.

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operator, op_list = nil) ⇒ BinaryOperator

Returns a new instance of BinaryOperator.



134
135
136
137
# File 'lib/voruby/adql/adql.rb', line 134

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.



130
131
132
# File 'lib/voruby/adql/adql.rb', line 130

def operator
  @operator
end

Instance Method Details

#to_adqlsObject



20
21
22
# File 'lib/voruby/adql/transforms.rb', line 20

def to_adqls
	self.operator
end

#to_sObject



148
149
150
# File 'lib/voruby/adql/adql.rb', line 148

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