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
Methods included from Common::Loaders::UseCase::CliIdentify
Methods included from Common::Loaders::UseCase::TargetModel
Methods included from Common::Loaders::UseCase::Type
Methods inherited from Common::Loaders::CaseBase
#name, name_only_once!, original_name
Methods inherited from Common::Loaders::Base
<=>, created_at, #initialize, set_created_at!
Methods included from Language::Klass::InheritableClassVars
#inheritable_attrs, #inheritable_class_vars, #inherited
Methods included from Language::Klass::Naming
#instance_variable_name, #to_constant
Methods included from Language::Klass::Hierarchy
Methods included from Language::Klass::Builder
Methods included from Language::Klass::Uid
Methods included from Language::Klass::Resolver
#class_resolver, #resolve_class
Methods included from Language::Klass::Const
#if_const, #redef_without_warning
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 20 |
# 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
23 24 25 26 27 28 29 |
# File 'lib/eco/api/usecases/ooze_samples/ooze_base_case.rb', line 23 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 |