Class: Eco::API::Custom::UseCase

Overview

Helper class to create a custom UseCase

Examples:

Example of usage:

class Custom::UseCase::Sync < Eco::API::Custom::UseCase
  name "custom-case"
  type :sync

  def main(entries, people, session, options, usecase)
    update   = session.new_job("main", "update", :update, usecase)
    session.micro.with_each(entries, people, options) do |entry, person|
      # update some data in person using data from entry
    end
  end

end

Instance Attribute Summary

Attributes included from Language::AuxiliarLogger

#logger

Method Summary

Methods inherited from Eco::API::Common::Loaders::UseCase

cli, cli!, #cli_apply!, #initialize, #main, type, #type

Methods inherited from Eco::API::Common::Loaders::CaseBase

#name, name_only_once!

Methods inherited from Eco::API::Common::Loaders::Base

<=>, created_at, #initialize, set_created_at!

Methods included from Eco::API::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

#log

Constructor Details

This class inherits a constructor from Eco::API::Common::Loaders::UseCase