class StringInquirer
Ruby on Rails 7.0.10
Since v2.2.3Wrapping a string in this class gives you a prettier way to test for equality. The value returned by Rails.env is wrapped in a StringInquirer object, so instead of calling this:
Rails.env == 'production'
you can call this:
Rails.env.production?
Instantiating a new StringInquirer
vehicle = ActiveSupport::StringInquirer.new('car') vehicle.car? # => true vehicle.bike? # => false
Inherits from
Private methods
(2)
Implementation detail — not part of the public API.
Methods (inherited)
From String (44)
- # acts_like_string?
- # at
- # blank?
- # camelcase
- # camelize
- # classify
- # constantize
- # dasherize
- # deconstantize
- # demodulize
- # exclude?
- # first
- # foreign_key
- # from
- # html_safe
- # humanize
- # in_time_zone
- # indent
- # indent!
- # inquiry
- # is_utf8?
- # last
- # mb_chars
- # parameterize
- # pluralize
- # remove
- # remove!
- # safe_constantize
- # singularize
- # squish
- # squish!
- # strip_heredoc
- # tableize
- # titlecase
- # titleize
- # to
- # to_date
- # to_datetime
- # to_time
- # truncate
- # truncate_bytes
- # truncate_words
- # underscore
- # upcase_first
From Object (16)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with_options
From ActiveRecord::TestFixtures (4)
From ActiveSupport::Concern (3)
- # class_methods
- # included
- # prepended