ActiveSupport::ArrayInquirer

class ActiveSupport::ArrayInquirer

Parent:
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

Public Instance Methods