class ArrayInquirer
Ruby on Rails 8.1.2
Since v5.2.8.1Array 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
Inherits from
Methods (defined here)
- # any?
Private methods
(2)
Implementation detail — not part of the public API.
Methods (inherited)
From Array (26)
- # deep_dup
- # excluding
- # extract!
- # extract_options!
- # fifth
- # forty_two
- # fourth
- # from
- # in_groups
- # in_groups_of
- # including
- # inquiry
- # second
- # second_to_last
- # split
- # third
- # third_to_last
- # to
- # to_formatted_s
- # to_fs
- # to_param
- # to_query
- # 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!
- # with
- # with_options
From ActiveSupport::NumericWithFormat (2)
- # to_formatted_s
- # to_fs