Sha256: d91811ec5a9988c097f2938304e59c26c67078fa3bc2c8645c05c2c9f478ec1e

Contents?: true

Size: 434 Bytes

Versions: 70

Compression:

Stored size: 434 Bytes

Contents

# frozen_string_literal: true

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

class String
  # 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
  def inquiry
    ActiveSupport::StringInquirer.new(self)
  end
end

Version data entries

70 entries across 68 versions & 11 rubygems

Version Path
activesupport-8.0.0 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.2.2 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.1.5 lib/active_support/core_ext/string/inquiry.rb
activesupport-8.0.0.rc2 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.2.1.2 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.1.4.2 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.0.8.6 lib/active_support/core_ext/string/inquiry.rb
activesupport-8.0.0.rc1 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.2.1.1 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.1.4.1 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.0.8.5 lib/active_support/core_ext/string/inquiry.rb
activesupport-8.0.0.beta1 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha9 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha8 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha7 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha4 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha3 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha2 lib/active_support/core_ext/string/inquiry.rb
omg-activesupport-8.0.0.alpha1 lib/active_support/core_ext/string/inquiry.rb
activesupport-7.1.4 lib/active_support/core_ext/string/inquiry.rb