Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/tebako-runtime/string.rb
Overview
Quote/unquote add-on for String class
Instance Method Summary collapse
Instance Method Details
#quote ⇒ Object
38 39 40 |
# File 'lib/tebako-runtime/string.rb', line 38 def quote "\"#{self}\"" end |
#quoted? ⇒ Boolean
30 31 32 |
# File 'lib/tebako-runtime/string.rb', line 30 def quoted? start_with?('"') && end_with?('"') end |
#unquote ⇒ Object
34 35 36 |
# File 'lib/tebako-runtime/string.rb', line 34 def unquote chomp('"').reverse.chomp('"').reverse end |