Class: Broadlistening::Steps::BaseStep
- Inherits:
-
Object
- Object
- Broadlistening::Steps::BaseStep
- Defined in:
- lib/broadlistening/steps/base_step.rb
Direct Known Subclasses
Aggregation, Clustering, Embedding, Extraction, InitialLabelling, MergeLabelling, Overview
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(config, context) ⇒ BaseStep
constructor
A new instance of BaseStep.
Constructor Details
#initialize(config, context) ⇒ BaseStep
Returns a new instance of BaseStep.
10 11 12 13 14 15 |
# File 'lib/broadlistening/steps/base_step.rb', line 10 def initialize(config, context) @config = config @context = context raise ArgumentError, "context must be a Context, got #{context.class}" unless context.is_a?(Context) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/broadlistening/steps/base_step.rb', line 6 def config @config end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/broadlistening/steps/base_step.rb', line 6 def context @context end |
Instance Method Details
#execute ⇒ Object
17 18 19 |
# File 'lib/broadlistening/steps/base_step.rb', line 17 def execute raise NotImplementedError, "#{self.class} must implement #execute" end |