Class: Plasma::Interpreter::Quote
- Defined in:
- lib/plasma/interpreter/plasma_grammarnode.rb
Instance Attribute Summary collapse
-
#unevaluated ⇒ Object
readonly
Returns the value of attribute unevaluated.
Instance Method Summary collapse
-
#initialize(plasma) ⇒ Quote
constructor
A new instance of Quote.
- #to_plasma ⇒ Object
- #unquote(env) ⇒ Object
Constructor Details
#initialize(plasma) ⇒ Quote
Returns a new instance of Quote.
67 68 69 |
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 67 def initialize(plasma) @unevaluated = plasma end |
Instance Attribute Details
#unevaluated ⇒ Object (readonly)
Returns the value of attribute unevaluated.
65 66 67 |
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 65 def unevaluated @unevaluated end |
Instance Method Details
#to_plasma ⇒ Object
75 76 77 |
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 75 def to_plasma "`#{@unevaluated.text_value}'" end |
#unquote(env) ⇒ Object
71 72 73 |
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 71 def unquote(env) @unevaluated.evaluate(env) end |