Class: Eco::API::UseCases::OozeSamples::OozeBaseCase
- Inherits:
-
Common::Loaders::UseCase
- Object
- Common::Loaders::Base
- Common::Loaders::CaseBase
- Common::Loaders::UseCase
- Eco::API::UseCases::OozeSamples::OozeBaseCase
- Includes:
- Helpers, Helpers::Rescuable
- Defined in:
- lib/eco/api/usecases/ooze_samples/ooze_base_case.rb
Direct Known Subclasses
Constant Summary collapse
- SAVE_PATCH =
"ooze_patch_update.json".freeze
- DRY_COUNT =
5
Constants included from Helpers::Filters
Helpers::Filters::FILTER_TIME_FORMAT
Instance Attribute Summary collapse
-
#target ⇒ Ecoportal::API::V2::Page
readonly
current target ooze.
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
- #main(_session, options, _usecase) ⇒ Object
-
#process_ooze(ooz = target) {|ooz| ... } ⇒ Object
Write here your script.
Methods included from Helpers::Rescuable
Methods included from Helpers::Filters
#date_range_filter, #days, #daystart, #field_key_name, #midnight, #previous_sunday, #set_time, #sunday, #tags_filter, #this_monday, #to_date_filter, #today, #weeks
Methods included from Helpers::Shortcuts
#bracked_regex, #clean_question, #is_number?, #non_letters_regex, #normalize_string, #object_reference, #same_string?, #simplify_string, #titleize, #to_i
Methods inherited from Common::Loaders::UseCase
cli, cli!, #cli_apply!, #initialize, type, #type
Methods inherited from Common::Loaders::CaseBase
Methods inherited from Common::Loaders::Base
<=>, created_at, #initialize, 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
Methods included from Language::AuxiliarLogger
Constructor Details
This class inherits a constructor from Eco::API::Common::Loaders::UseCase
Instance Attribute Details
#target ⇒ Ecoportal::API::V2::Page (readonly)
current target ooze.
2 3 4 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_base_case.rb', line 2 def target @target end |
Instance Method Details
#main(_session, options, _usecase) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_base_case.rb', line 14 def main(_session, , _usecase) [:end_get] = false raise "You need to inherit from this class ('#{self.class}') and call super with a block" unless block_given? @target = nil yield end |
#process_ooze(ooz = target) {|ooz| ... } ⇒ Object
Write here your script
22 23 24 25 26 27 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_base_case.rb', line 22 def process_ooze(ooz = target) ooz ||= ooze raise "You need to inherit from this class ('#{self.class}') and call super with a block" unless block_given? yield(ooz) update_ooze(ooz) end |