Class: CSVPlusPlus::Language::Entities::RuntimeValue

Inherits:
Entity
  • Object
show all
Defined in:
lib/csv_plus_plus/language/entities/runtime_value.rb

Overview

A runtime value

These are values which can be materialized at any point via the resolve_fn which takes an ExecutionContext as a param

Instance Attribute Summary collapse

Attributes inherited from Entity

#id, #type

Instance Method Summary collapse

Methods inherited from Entity

#==, #method_missing, #respond_to_missing?

Constructor Details

#initialize(resolve_fn) ⇒ RuntimeValue

initialize



15
16
17
18
# File 'lib/csv_plus_plus/language/entities/runtime_value.rb', line 15

def initialize(resolve_fn)
  super(:runtime_value)
  @resolve_fn = resolve_fn
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CSVPlusPlus::Language::Entities::Entity

Instance Attribute Details

#resolve_fnObject (readonly)

Returns the value of attribute resolve_fn.



12
13
14
# File 'lib/csv_plus_plus/language/entities/runtime_value.rb', line 12

def resolve_fn
  @resolve_fn
end

Instance Method Details

#to_sObject

to_s



21
22
23
# File 'lib/csv_plus_plus/language/entities/runtime_value.rb', line 21

def to_s
  '(runtime_value)'
end