Class: Sapphire::DSL::NotComparison

Inherits:
Comparison show all
Defined in:
lib/sapphire/DSL/Comparisons/NotComparison.rb

Instance Attribute Summary

Attributes inherited from Comparison

#item

Instance Method Summary collapse

Methods inherited from Comparison

#CompareWith, #Create, #Evaluate, #Output, #execute, #initialize, #left, #left=, #right, #right=

Constructor Details

This class inherits a constructor from Sapphire::DSL::Comparison

Instance Method Details

#Compare(left, right) ⇒ Object



9
10
11
12
# File 'lib/sapphire/DSL/Comparisons/NotComparison.rb', line 9

def Compare(left, right)
  return @comparator.Compare(left != right, true) if @comparator != nil
  left != right
end

#TextObject



14
15
16
17
# File 'lib/sapphire/DSL/Comparisons/NotComparison.rb', line 14

def Text
  return @comparator.Text + " NOT" if @comparator != nil
  " NOT"
end