Class: Synthra::Behaviors::Registry::BlockBehavior Private
- Inherits:
-
Object
- Object
- Synthra::Behaviors::Registry::BlockBehavior
- Defined in:
- lib/synthra/behaviors/registry.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wrapper for block-based behaviors
Allows blocks to be used as behaviors. The wrapper creates BlockBehaviorInstance objects when instantiated.
Instance Method Summary collapse
-
#initialize {|context, result, value| ... } ⇒ BlockBehavior
constructor
private
Create a new block behavior wrapper.
-
#new(value, rng = nil) ⇒ BlockBehaviorInstance
private
Create a new instance of this block behavior.
Constructor Details
#initialize {|context, result, value| ... } ⇒ BlockBehavior
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new block behavior wrapper
183 184 185 |
# File 'lib/synthra/behaviors/registry.rb', line 183 def initialize(&block) @block = block end |
Instance Method Details
#new(value, rng = nil) ⇒ BlockBehaviorInstance
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new instance of this block behavior
195 196 197 |
# File 'lib/synthra/behaviors/registry.rb', line 195 def new(value, rng = nil) BlockBehaviorInstance.new(value, rng, @block) end |