Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/lunar_cheese/dump.rb
Instance Method Summary collapse
-
#to_lua ⇒ String
Dump the string to a format used by Don’t Starve table dumps.
Instance Method Details
#to_lua ⇒ String
Dump the string to a format used by Don’t Starve table dumps. This will a) surround the string with quotation marks (“) and b) escape any quotation marks which it contains.
13 14 15 |
# File 'lib/lunar_cheese/dump.rb', line 13 def to_lua "\"#{ gsub(/"/, '\"') }\"" end |