instance method
inquiry
Ruby on Rails 5.2.8.1
Since v3.1.12Signature
inquiry()
Wraps the current string in the ActiveSupport::StringInquirer class, which gives you a prettier way to test for equality.
env = 'production'.inquiry env.production? # => true env.development? # => false
Source
# File activesupport/lib/active_support/core_ext/string/inquiry.rb, line 12
def inquiry
ActiveSupport::StringInquirer.new(self)
end
Defined in activesupport/lib/active_support/core_ext/string/inquiry.rb line 12
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String