# File lib/netzke/core_ext/string.rb, line 2 def jsonify self.camelize(:lower) end
Converts self to “literal JSON”-string - one that doesn’t get quotes appended when being sent “to_json” method
# File lib/netzke/core_ext/string.rb, line 7 def l ActiveSupport::JSON::Variable.new(self) end
removes JS-comments (both single- and multi-line) from the string
# File lib/netzke/core_ext/string.rb, line 12 def strip_js_comments regexp = /\/\/.*$|(?m:\/\*.*?\*\/)/ self.gsub!(regexp, '') # also remove empty lines regexp = /^\s*\n/ self.gsub!(regexp, '') end
Generated with the Darkfish Rdoc Generator 2.