class ArrayInquirer
Ruby on Rails 5.2.8.1
Since v5.2.8.1Wrapping 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
Inherits from
Methods (defined here)
- # any?
Private methods
(2)
Implementation detail — not part of the public API.
Methods (inherited)
From Array (24)
- # deep_dup
- # extract_options!
- # fifth
- # forty_two
- # fourth
- # from
- # in_groups
- # in_groups_of
- # inquiry
- # second
- # second_to_last
- # split
- # third
- # third_to_last
- # to
- # to_default_s
- # to_formatted_s
- # to_param
- # to_query
- # to_s
- # to_sentence
- # to_xml
- # without
- self. wrap
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # with_options