Class: Qrpm::ValueNode
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Override Qrpm#value.
Attributes inherited from Node
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(parent, name, expr) ⇒ ValueNode
constructor
A new instance of ValueNode.
- #interpolate(dict) ⇒ Object
- #signature ⇒ Object
-
#source ⇒ Object
Source code of expression.
-
#variables ⇒ Object
Override Qrpm methods.
Methods inherited from Node
#class_name, #dot, #inspect, #interpolated?, #traverse
Constructor Details
Instance Attribute Details
#value ⇒ Object (readonly)
Override Qrpm#value. Initially nil, initialized by #interpolate
122 123 124 |
# File 'lib/qrpm/node.rb', line 122 def value @value end |
Instance Method Details
#dump ⇒ Object
139 |
# File 'lib/qrpm/node.rb', line 139 def dump() puts value ? value : source end |
#interpolate(dict) ⇒ Object
133 134 135 136 |
# File 'lib/qrpm/node.rb', line 133 def interpolate(dict) @value ||= expr.interpolate(dict) # Allows StandardDirNode to do its own assignment super end |
#signature ⇒ Object
138 |
# File 'lib/qrpm/node.rb', line 138 def signature() "#{class_name}(#{name},#{expr.source})" end |
#source ⇒ Object
Source code of expression
119 |
# File 'lib/qrpm/node.rb', line 119 def source() @expr.source end |
#variables ⇒ Object
Override Qrpm methods
131 |
# File 'lib/qrpm/node.rb', line 131 def variables() @variables ||= expr.variables end |