Class: CSVPlusPlus::Entities::RuntimeValue
- Defined in:
- lib/csv_plus_plus/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
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#resolve_fn ⇒ lambda
readonly
A lambda that is called when the runtime value is resolved.
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(resolve_fn, arguments: nil) ⇒ RuntimeValue
constructor
A new instance of RuntimeValue.
- #to_s ⇒ String
Methods inherited from Entity
#==, #method_missing, #respond_to_missing?
Constructor Details
#initialize(resolve_fn, arguments: nil) ⇒ RuntimeValue
Returns a new instance of RuntimeValue.
13 14 15 16 17 18 |
# File 'lib/csv_plus_plus/entities/runtime_value.rb', line 13 def initialize(resolve_fn, arguments: nil) super(:runtime_value) @arguments = arguments @resolve_fn = resolve_fn end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CSVPlusPlus::Entities::Entity
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/csv_plus_plus/entities/runtime_value.rb', line 10 def arguments @arguments end |
#resolve_fn ⇒ lambda (readonly)
A lambda that is called when the runtime value is resolved
9 10 11 |
# File 'lib/csv_plus_plus/entities/runtime_value.rb', line 9 def resolve_fn @resolve_fn end |
Instance Method Details
#to_s ⇒ String
21 22 23 |
# File 'lib/csv_plus_plus/entities/runtime_value.rb', line 21 def to_s '(runtime_value)' end |