Class: Dentaku::AST::String
- Defined in:
- lib/dentaku/ast/string.rb
Instance Attribute Summary
Attributes inherited from Literal
Instance Method Summary collapse
Methods inherited from Literal
#accept, #dependencies, #initialize, #value
Methods inherited from Node
arity, #dependencies, #name, precedence, resolve_class, #type
Constructor Details
This class inherits a constructor from Dentaku::AST::Literal
Instance Method Details
#escaped ⇒ Object
10 11 12 |
# File 'lib/dentaku/ast/string.rb', line 10 def escaped @value.gsub('"', '\"') end |
#quoted ⇒ Object
6 7 8 |
# File 'lib/dentaku/ast/string.rb', line 6 def quoted %Q{"#{ escaped }"} end |