Class: Eco::API::UseCases::OozeSamples::OozeRunBaseCase
- Inherits:
-
OozeBaseCase
- Object
- Common::Loaders::Base
- Common::Loaders::CaseBase
- Common::Loaders::UseCase
- OozeBaseCase
- Eco::API::UseCases::OozeSamples::OozeRunBaseCase
- Defined in:
- lib/eco/api/usecases/ooze_samples/ooze_run_base_case.rb
Overview
Base class to run a script against a single ooze.
Direct Known Subclasses
Constant Summary collapse
- SAVE_PATCH =
"ooze_patch_update.json"
Constants inherited from OozeBaseCase
Eco::API::UseCases::OozeSamples::OozeBaseCase::DRY_COUNT
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#usecase ⇒ Object
readonly
Returns the value of attribute usecase.
Attributes inherited from OozeBaseCase
Instance Method Summary collapse
Methods included from Helpers::Shortcuts
#clean_question, #normalize_string, #object_reference, #same_string?, #titleize
Methods inherited from Common::Loaders::UseCase
Methods inherited from Common::Loaders::CaseBase
Methods inherited from Common::Loaders::Base
<=>, created_at, #initialize, #name, set_created_at!
Methods included from Common::ClassHelpers
#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant
Constructor Details
This class inherits a constructor from Eco::API::Common::Loaders::UseCase
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_run_base_case.rb', line 6 def @options end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
6 7 8 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_run_base_case.rb', line 6 def session @session end |
#usecase ⇒ Object (readonly)
Returns the value of attribute usecase.
6 7 8 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_run_base_case.rb', line 6 def usecase @usecase end |
Instance Method Details
#main(session, options, usecase, &block) ⇒ Object
10 11 12 13 14 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_run_base_case.rb', line 10 def main(session, , usecase, &block) raise "You need to inherit from this class and call super with a block" unless block @session = session; @options = ; @usecase = usecase process_ooze(&block) end |
#process_ooze(ooze = target) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_run_base_case.rb', line 16 def process_ooze(ooze = target) raise "You need to inherit from this class and call super with a block" unless block_given? super(ooze) do yield(ooze) exit_if_no_changes! end end |