Module: Validate::Compare::TransformUsing
- Included in:
- ToValue, WithAttributes
- Defined in:
- lib/validate/compare.rb
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
11 12 13 14 15 |
# File 'lib/validate/compare.rb', line 11 def <=>(other) return super if @transform_block.nil? super(@transform_block.call(other)) end |
#using(&transform_block) ⇒ Object
6 7 8 9 |
# File 'lib/validate/compare.rb', line 6 def using(&transform_block) @transform_block = transform_block self end |