Class: Plasma::Interpreter::Quote

Inherits:
Object
  • Object
show all
Defined in:
lib/plasma/interpreter/plasma_grammarnode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#unevaluatedObject (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_plasmaObject



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