Class: ActiveSupport::JSON::Variable
- Defined in:
- lib/active_support/json/variable.rb
Overview
Deprecated: A string that returns itself as its JSON-encoded form.
Constant Summary
Constants inherited from String
Instance Method Summary collapse
-
#as_json(options = nil) ⇒ Object
:nodoc:.
-
#encode_json(encoder) ⇒ Object
:nodoc:.
-
#initialize(*args) ⇒ Variable
constructor
A new instance of Variable.
Methods inherited from String
#acts_like_string?, #at, #blank?, #camelize, #classify, #constantize, #dasherize, #deconstantize, #demodulize, #encoding_aware?, #exclude?, #first, #foreign_key, #from, #html_safe, #humanize, #inquiry, #is_utf8?, #last, #mb_chars, #ord, #parameterize, #pluralize, #safe_constantize, #singularize, #squish, #squish!, #strip_heredoc, #tableize, #titleize, #to, #to_date, #to_datetime, #to_time, #truncate, #underscore
Constructor Details
#initialize(*args) ⇒ Variable
Returns a new instance of Variable.
7 8 9 10 11 |
# File 'lib/active_support/json/variable.rb', line 7 def initialize(*args) ActiveSupport::Deprecation.warn 'ActiveSupport::JSON::Variable is deprecated and will be removed in Rails 4.0. ' \ 'For your own custom JSON literals, define #as_json and #encode_json yourself.' super end |