Method: String#inquiry
- Defined in:
- lib/active_support/core_ext/string/inquiry.rb
permalink #inquiry ⇒ Object
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
13 14 15 |
# File 'lib/active_support/core_ext/string/inquiry.rb', line 13 def inquiry ActiveSupport::StringInquirer.new(self) end |