Class: ActiveSupport::JSON::Variable

Inherits:
String show all
Defined in:
lib/monetra/active_support/json.rb

Overview

returns the literal string as its JSON encoded form. Useful for passing javascript variables into functions.

page.call ‘Element.show’, ActiveSupport::JSON::Variable.new(“$$(#items li)”)

Instance Method Summary collapse

Methods inherited from String

#blank?, #to_xs

Methods included from CoreExtensions::String::Iterators

#each_char

Methods included from CoreExtensions::String::StartsEndsWith

#ends_with?, #starts_with?

Methods included from CoreExtensions::String::Inflections

#camelize, #classify, #constantize, #dasherize, #demodulize, #foreign_key, #humanize, #pluralize, #singularize, #tableize, #titleize, #underscore

Methods included from CoreExtensions::String::Conversions

#to_date, #to_time

Methods included from CoreExtensions::String::Access

#at, #first, #from, #last, #to

Instance Method Details

#to_jsonObject

:nodoc:



11
12
13
# File 'lib/monetra/active_support/json.rb', line 11

def to_json
  self
end