Class: DDQL::PostfixNullTypeOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/ddql/postfix_null_type_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, #postfix?, #prefix?, #register, #right?, #simple_comparison?, #type?

Constructor Details

#initialize(symbol, null_type) ⇒ PostfixNullTypeOperator

Returns a new instance of PostfixNullTypeOperator.



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

def initialize(symbol, null_type)
  super("IS #{symbol}", "Is #{symbol}", :postfix, 9, false, :boolean)
  @null_type = null_type
  @pattern   = /IS\s+#{symbol}/
end

Instance Attribute Details

#patternObject (readonly)

Returns the value of attribute pattern.



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

def pattern
  @pattern
end