Class: Gemologist::RuntimeValue
- Inherits:
-
Object
- Object
- Gemologist::RuntimeValue
- Defined in:
- lib/gemologist/runtime_value.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node) ⇒ RuntimeValue
constructor
A new instance of RuntimeValue.
- #inspect ⇒ Object
- #source ⇒ Object
Constructor Details
#initialize(node) ⇒ RuntimeValue
Returns a new instance of RuntimeValue.
5 6 7 |
# File 'lib/gemologist/runtime_value.rb', line 5 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
3 4 5 |
# File 'lib/gemologist/runtime_value.rb', line 3 def node @node end |
Instance Method Details
#inspect ⇒ Object
13 14 15 |
# File 'lib/gemologist/runtime_value.rb', line 13 def inspect "<#{self.class.name} #{source.inspect}>" end |
#source ⇒ Object
9 10 11 |
# File 'lib/gemologist/runtime_value.rb', line 9 def source @source ||= node.loc.expression.source end |