class ActiveSupport::ArrayInquirer
def any?(*candidates, &block)
variants.any?('phone', 'desktop') # => true
variants.any?(:phone, :tablet) # => true
variants.any? # => true
variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet])
collection is not given, method returns true.
The method returns true if at least one element is the same. If +candidates+
Passes each element of +candidates+ collection to ArrayInquirer collection.
def any?(*candidates, &block) if candidates.none? super else candidates.any? do |candidate| include?(candidate.to_sym) || include?(candidate.to_s) end end end