Class: DDQL::InfixFloatMapOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/ddql/infix_float_map_operator.rb

Instance Attribute Summary collapse

Attributes inherited from Operator

#associativity, #name, #precedence, #return_type, #symbol, #type

Instance Method Summary collapse

Methods inherited from Operator

#any_type?, #boolean?, #comparison?, #complex_comparison?, #infix?, #left?, #math?, #parse, #pattern, #postfix?, #prefix?, #register, #right?, #simple_comparison?, #type?

Constructor Details

#initialize(symbol, name, op_type, comparison) ⇒ InfixFloatMapOperator

Returns a new instance of InfixFloatMapOperator.



5
6
7
8
9
10
# File 'lib/ddql/infix_float_map_operator.rb', line 5

def initialize(symbol, name, op_type, comparison)
  super(symbol, name, :infix, 4, false, :boolean)
  @op_type    = op_type
  @comparison = comparison
  @op_symbol  = :"op_float_map_#{op_type}_#{comparison}"
end

Instance Attribute Details

#comparisonObject (readonly)

Returns the value of attribute comparison.



3
4
5
# File 'lib/ddql/infix_float_map_operator.rb', line 3

def comparison
  @comparison
end

#op_symbolObject (readonly)

Returns the value of attribute op_symbol.



3
4
5
# File 'lib/ddql/infix_float_map_operator.rb', line 3

def op_symbol
  @op_symbol
end

#op_typeObject (readonly)

Returns the value of attribute op_type.



3
4
5
# File 'lib/ddql/infix_float_map_operator.rb', line 3

def op_type
  @op_type
end