Sha256: de51c0482eaecb5e2d7db5e993688878155df304fe6317408df06cc91113a016
Contents?: true
Size: 633 Bytes
Versions: 39
Compression:
Stored size: 633 Bytes
Contents
module Lipsiadmin module Utils # Returns an object whose to_json evaluates to code. # Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method. # # Examples: # # "function() { alert('test') }".to_l # module Literal # Returns an object whose <tt>to_json</tt> evaluates to +code+. Use this to pass a literal JavaScript # expression as an argument to another JavaScriptGenerator method. # def to_literal ActiveSupport::JSON::Variable.new(self.to_s) end alias_method :to_l, :to_literal end end end
Version data entries
39 entries across 39 versions & 1 rubygems