Class: RulerCoaster::Operator::Contain

Inherits:
Base
  • Object
show all
Defined in:
lib/ruler_coaster/operator/contain.rb

Direct Known Subclasses

NotContain

Instance Attribute Summary

Attributes inherited from Base

#assert_value

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from RulerCoaster::Operator::Base

Instance Method Details

#call(value) ⇒ Object



4
5
6
# File 'lib/ruler_coaster/operator/contain.rb', line 4

def call(value)
  assert_value.map(&:to_s).map(&:downcase).include?(value.to_s.downcase)
end