Class: Scribble::Nodes::Value

Inherits:
Node
  • Object
show all
Defined in:
lib/scribble/nodes/value.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#slice

Instance Method Summary collapse

Methods inherited from Node

#block?, #line_and_column, #split?

Constructor Details

#initialize(slice, value) ⇒ Value

Returns a new instance of Value.



6
7
8
9
# File 'lib/scribble/nodes/value.rb', line 6

def initialize slice, value
  super(slice)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/scribble/nodes/value.rb', line 4

def value
  @value
end

Instance Method Details

#evaluate(context, **options) ⇒ Object



11
12
13
# File 'lib/scribble/nodes/value.rb', line 11

def evaluate context, **options
  @value
end