Class: Roast::SystemCog::Params
- Inherits:
-
Object
- Object
- Roast::SystemCog::Params
- Defined in:
- lib/roast/system_cog/params.rb
Overview
Parameters for system cogs set at workflow evaluation time
Params are used to provide limited evaluation-time parameterization to system cogs, such as the name of the execute scope to be invoked by a ‘call`, `map`, a, `repeat` cog.
System cogs also accept input at execution time, just like regular cogs.
Direct Known Subclasses
Roast::SystemCogs::Call::Params, Roast::SystemCogs::Map::Params, Roast::SystemCogs::Repeat::Params
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The name identifier for this system cog instance.
Instance Method Summary collapse
-
#anonymous? ⇒ Boolean
Whether the cog is using a fallback name, or was given one explicitly.
-
#initialize(name) ⇒ Params
constructor
Initialize parameters with the cog name.
Constructor Details
#initialize(name) ⇒ Params
Initialize parameters with the cog name
Subclasses should define their own ‘initialize` accepting specific parameters.
: (Symbol?) -> void
25 26 27 28 |
# File 'lib/roast/system_cog/params.rb', line 25 def initialize(name) @anonymous = name.nil? #: bool @name = name || Cog.generate_fallback_name end |
Instance Attribute Details
#name ⇒ Object (readonly)
The name identifier for this system cog instance
Used to reference this cog’s output. Auto-generated if not provided.
: Symbol
18 19 20 |
# File 'lib/roast/system_cog/params.rb', line 18 def name @name end |
Instance Method Details
#anonymous? ⇒ Boolean
Whether the cog is using a fallback name, or was given one explicitly.
: () -> bool
33 34 35 |
# File 'lib/roast/system_cog/params.rb', line 33 def anonymous? @anonymous end |