Class: Eco::API::UseCases::OozeSamples::RegisterUpdateCase
- Inherits:
 - 
      OozeBaseCase
      
        
- Object
 - Common::Loaders::Base
 - Common::Loaders::CaseBase
 - Common::Loaders::UseCase
 - OozeBaseCase
 - Eco::API::UseCases::OozeSamples::RegisterUpdateCase
 
 
- Includes:
 - Helpers::Creatable
 
- Defined in:
 - lib/eco/api/usecases/ooze_samples/register_update_case.rb
 
Overview
- You can define methods 
filtersandsearchto change the target entries of the register - You need to define the 
process_oozemethod 
Use case to update a register
This case expects options[:source][:register_id]
Direct Known Subclasses
Constant Summary
Constants inherited from OozeBaseCase
OozeBaseCase::DRY_COUNT, OozeBaseCase::SAVE_PATCH
Constants included from Helpers::Filters
Helpers::Filters::FILTER_TIME_FORMAT
Instance Attribute Summary collapse
- 
  
    
      #attempted_ooze_updates  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute attempted_ooze_updates.
 - 
  
    
      #created_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute created_oozes.
 - 
  
    
      #dupped_search_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute dupped_search_oozes.
 - 
  
    
      #failed_update_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute failed_update_oozes.
 - 
  
    
      #non_retrieved_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute non_retrieved_oozes.
 - 
  
    
      #ooze_create_attempts  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute ooze_create_attempts.
 - 
  
    
      #ooze_result_ids  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute ooze_result_ids.
 - 
  
    
      #retrieved_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute retrieved_oozes.
 - 
  
    
      #total_search_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute total_search_oozes.
 - 
  
    
      #updated_oozes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute updated_oozes.
 
Attributes inherited from OozeBaseCase
Attributes included from Language::AuxiliarLogger
Class Method Summary collapse
- 
  
    
      .batch_size(size = nil)  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  
  
    
The number of pages to be processed in each batch.
 
Instance Method Summary collapse
- #main(session, options, usecase, mode: :legacy, &block) ⇒ Object
 - #process_ooze(_ooze = target) ⇒ Object
 
Methods included from Helpers::Creatable
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
#attempted_ooze_updates ⇒ Object (readonly)
Returns the value of attribute attempted_ooze_updates.
      24 25 26  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 24 def attempted_ooze_updates @attempted_ooze_updates end  | 
  
#created_oozes ⇒ Object (readonly)
Returns the value of attribute created_oozes.
      25 26 27  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 25 def created_oozes @created_oozes end  | 
  
#dupped_search_oozes ⇒ Object (readonly)
Returns the value of attribute dupped_search_oozes.
      22 23 24  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 22 def dupped_search_oozes @dupped_search_oozes end  | 
  
#failed_update_oozes ⇒ Object (readonly)
Returns the value of attribute failed_update_oozes.
      24 25 26  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 24 def failed_update_oozes @failed_update_oozes end  | 
  
#non_retrieved_oozes ⇒ Object (readonly)
Returns the value of attribute non_retrieved_oozes.
      21 22 23  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 21 def non_retrieved_oozes @non_retrieved_oozes end  | 
  
#ooze_create_attempts ⇒ Object (readonly)
Returns the value of attribute ooze_create_attempts.
      25 26 27  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 25 def ooze_create_attempts @ooze_create_attempts end  | 
  
#ooze_result_ids ⇒ Object (readonly)
Returns the value of attribute ooze_result_ids.
      23 24 25  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 23 def ooze_result_ids @ooze_result_ids end  | 
  
#retrieved_oozes ⇒ Object (readonly)
Returns the value of attribute retrieved_oozes.
      21 22 23  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 21 def retrieved_oozes @retrieved_oozes end  | 
  
#total_search_oozes ⇒ Object (readonly)
Returns the value of attribute total_search_oozes.
      22 23 24  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 22 def total_search_oozes @total_search_oozes end  | 
  
#updated_oozes ⇒ Object (readonly)
Returns the value of attribute updated_oozes.
      24 25 26  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 24 def updated_oozes @updated_oozes end  | 
  
Class Method Details
.batch_size(size = nil) ⇒ Integer
Returns the number of pages to be processed in each batch.
      11 12 13 14 15  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 11 def batch_size(size = nil) @batch_size ||= 25 return @batch_size unless size @batch_size = size end  | 
  
Instance Method Details
#main(session, options, usecase, mode: :legacy, &block) ⇒ Object
      27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 27 def main(session, , usecase, mode: :legacy, &block) init_kpis super(session, , usecase) do if mode == :legacy with_each_entry do process_ooze(&block) end elsif mode == :delegate raise "You need to pass a block when running main in `:delegate` mode" unless block_given? yield end end log_kpis end  | 
  
#process_ooze(_ooze = target) ⇒ Object
      44 45 46  | 
    
      # File 'lib/eco/api/usecases/ooze_samples/register_update_case.rb', line 44 def process_ooze(_ooze = target) raise "You need to define this method" end  |