lib/utils/literal.rb in lipsiadmin-5.1.6 vs lib/utils/literal.rb in lipsiadmin-5.1.7
- old
+ new
@@ -1,20 +1,20 @@
module Lipsiadmin
module Utils
- # Returns an object whose to_json evaluates to code.
+ # 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
+ # 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
\ No newline at end of file
+end