Permalink
Newer
Older
100644 14 lines (12 sloc) 375 Bytes
1
require 'active_support/string_inquirer'
2
3
class String
May 7, 2011
4
# Wraps the current string in the <tt>ActiveSupport::StringInquirer</tt> class,
5
# which gives you a prettier way to test for equality. Example:
6
#
7
# env = "production".inquiry
8
# env.production? # => true
9
# env.development? # => false
10
def inquiry
11
ActiveSupport::StringInquirer.new(self)
12
end
13
end