ri > ActiveSupport::ArrayInquirer

ActiveSupport::ArrayInquirer < Array

📖 NAME

ActiveSupport::ArrayInquirer — Wrapping an array in an ArrayInquirer gives a friendlier way to check its string-like contents.

🚀 Quick Reference

Use Case Command Description
🔍 Check if a variant is present variants.phone? Returns true if :phone is in the array
🔍 Check if a variant is present variants.tablet? Returns true if :tablet is in the array
🔍 Check if a variant is absent variants.desktop? Returns false if :desktop is not in the array
🔍 Check if any element matches variants.any? Returns true if the array has any elements

📝 DESCRIPTION

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

🔧 Instance Methods

📚 SEE ALSO

ActiveSupport::ArrayInquirer
ActiveSupport::ArrayInquirer < Array 📖 NAME 🚀 Quick Reference 📝 DESCRIPTION 🔧 Instance Methods 📚 SEE ALSO

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-27 17:49 @216.73.216.199
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format