Sha256: 41e824f05b1bcff66917574b3dfafcc7da775504186cd1c9394ffca01968bb23

Contents?: true

Size: 443 Bytes

Versions: 56

Compression:

Stored size: 443 Bytes

Contents

# frozen_string_literal: true

require "active_support/string_inquirer"
require "active_support/environment_inquirer"

class String
  # Wraps the current string in the <tt>ActiveSupport::StringInquirer</tt> class,
  # which gives you a prettier way to test for equality.
  #
  #   env = 'production'.inquiry
  #   env.production?  # => true
  #   env.development? # => false
  def inquiry
    ActiveSupport::StringInquirer.new(self)
  end
end

Version data entries

56 entries across 54 versions & 7 rubygems

Version Path
activesupport-6.1.7.10 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.9 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.8 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.7 lib/active_support/core_ext/string/inquiry.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/core_ext/string/inquiry.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-7.0.2.3/lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.6 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.5 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.4 lib/active_support/core_ext/string/inquiry.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/core_ext/string/inquiry.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activesupport-7.0.2.3/lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.3 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.2 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7.1 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.7 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.6.1 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.6 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.0.2.4 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.5.1 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.1.5 lib/active_support/core_ext/string/inquiry.rb