Class: Wolflow::Operators::Literal
- Defined in:
- lib/wolflow/operators/literal.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(value:, **args) ⇒ Literal
constructor
A new instance of Literal.
- #to_hash ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(value:, **args) ⇒ Literal
Returns a new instance of Literal.
6 7 8 9 |
# File 'lib/wolflow/operators/literal.rb', line 6 def initialize(value:, **args) @value = value super(**args) end |
Instance Method Details
#call ⇒ Object
11 12 13 |
# File 'lib/wolflow/operators/literal.rb', line 11 def call(*) @value end |
#to_hash ⇒ Object
15 16 17 18 19 |
# File 'lib/wolflow/operators/literal.rb', line 15 def to_hash hs = super hs[:value] = @value hs end |