Class: Jcsv::RBEquals
Overview
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes included from NextFilter
Instance Method Summary collapse
- #execute(value, context) ⇒ Object
-
#initialize(value = nil) ⇒ RBEquals
constructor
A new instance of RBEquals.
Methods included from NextFilter
Constructor Details
#initialize(value = nil) ⇒ RBEquals
Returns a new instance of RBEquals.
84 85 86 87 |
# File 'lib/constraints.rb', line 84 def initialize(value = nil) @value = value super() end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
82 83 84 |
# File 'lib/constraints.rb', line 82 def value @value end |
Instance Method Details
#execute(value, context) ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'lib/constraints.rb', line 89 def execute(value, context) validateInputNotNull(value, context) @value ||= value # if value not initialized then use the first read value for equals raise "Value '#{value}' is not equal to '#{@value}':\n#{context}" if (value != @value) exec_next(value, context) end |