Class: ActiveSupport::JSON::Variable
- Defined in:
- lib/active_support/json/variable.rb
Overview
Deprecated: A string that returns itself as its JSON-encoded form.
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, #in_time_zone, #indent, #indent!, #inquiry, #is_utf8?, #last, #mb_chars, #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 12 |
# File 'lib/active_support/json/variable.rb', line 7 def initialize(*args) = 'ActiveSupport::JSON::Variable is deprecated and will be removed in Rails 4.1. ' \ 'For your own custom JSON literals, define #as_json and #encode_json yourself.' ActiveSupport::Deprecation.warn super end |