class
ActiveSupport::ArrayInquirer
v5.0.0.1 -
Show latest stable
- Superclass: Array
Wrapping an array in an ArrayInquirer gives a friendlier way to check its string-like contents:
variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) variants.phone? # => true variants.tablet? # => true variants.desktop? # => false
Files
- activesupport/lib/active_support/array_inquirer.rb