Sha256: b77dcacc8f22eca9414972c3fd6bfdd80ae690cf586f42681b990afb6cf51ebb

Contents?: true

Size: 397 Bytes

Versions: 99

Compression:

Stored size: 397 Bytes

Contents

# frozen_string_literal: true

require "active_support/string_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

99 entries across 90 versions & 11 rubygems

Version Path
activesupport-6.0.4.1 lib/active_support/core_ext/string/inquiry.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.4/lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.4 lib/active_support/core_ext/string/inquiry.rb
activesupport-5.2.6 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.7 lib/active_support/core_ext/string/inquiry.rb
activesupport-5.2.4.6 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.6 lib/active_support/core_ext/string/inquiry.rb
activesupport-5.2.5 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.5 lib/active_support/core_ext/string/inquiry.rb
activesupport-5.2.4.5 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.4 lib/active_support/core_ext/string/inquiry.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/string/inquiry.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/string/inquiry.rb
activesupport-5.2.4.4 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.3 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.2 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.1 lib/active_support/core_ext/string/inquiry.rb
activesupport-5.2.4.3 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3 lib/active_support/core_ext/string/inquiry.rb
activesupport-6.0.3.rc1 lib/active_support/core_ext/string/inquiry.rb