Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Superclass: Array

Array Inquirer

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
Show files where this class is defined (1 file)
Register or log in to add new notes.