Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/string.rb

Instance Method Summary collapse

Instance Method Details

#to_j(indent = 0) ⇒ String

Returns Json for the String, which is quoted self.

Returns:

  • (String)

    Json for the String, which is quoted self.



3
4
5
# File 'lib/string.rb', line 3

def to_j(indent = 0)
  "  "*indent + "\"#{self}\""
end