Class: Eco::API::Common::Loaders::UseCase
- Extended by:
- CliIdentify
- Includes:
- TargetModel, Type
- Defined in:
- lib/eco/api/common/loaders/use_case.rb,
lib/eco/api/common/loaders/use_case/type.rb,
lib/eco/api/common/loaders/use_case/cli_identify.rb,
lib/eco/api/common/loaders/use_case/target_model.rb
Direct Known Subclasses
Eco::API::Custom::UseCase, UseCases::Default::Locations::CodesToTagsCase, UseCases::Default::Locations::CsvToTree, UseCases::Default::Locations::TagTreePaths, UseCases::Default::Meta::GraphQLSchema, UseCases::Default::People::Amend::CleanUnknownTags, UseCases::Default::People::Amend::ClearAbilitiesTransCase, UseCases::Default::People::Amend::RefreshCase, UseCases::Default::People::Amend::ReinviteTransCase, UseCases::Default::People::Amend::RestoreDBCase, UseCases::Default::People::Migrate::RemapTags, UseCases::Default::People::Treat::Analyse, UseCases::Default::People::Treat::OrgDataConvertCase, UseCases::Default::People::Treat::SupersCyclicIdentify, UseCases::Default::People::Treat::SupersHierarchy, UseCases::Default::People::Utils::ChangeEMailCase, UseCases::Default::People::Utils::SetDefaultTagCase, UseCases::Default::People::Utils::SwitchSupervisorCase, UseCases::Default::People::Utils::TransferAccountCase, UseCases::Default::Utils::EntriesToCsv, UseCases::Default::Utils::JsonToCsv, UseCases::Default::Utils::SplitCsv, UseCases::Default::Utils::SplitJson, UseCases::DefaultCases::CreateCase, UseCases::DefaultCases::DeleteTransCase, UseCases::DefaultCases::HrisCase, UseCases::DefaultCases::ToCsvCase, UseCases::DefaultCases::UpdateCase, UseCases::DefaultCases::UpsertCase, UseCases::GraphQL::Base, UseCases::OozeSamples::OozeBaseCase, UseCases::OozeSamples::RegisterExportCase, UseCases::Samples::Drivers::Sftp, UseCases::Samples::Drivers::UrlPull
Defined Under Namespace
Modules: CliIdentify, TargetModel, Type
Instance Attribute Summary
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
- #cli_apply! ⇒ Object
-
#initialize(usecases) ⇒ UseCase
constructor
rubocop:disable Lint/MissingSuper.
-
#main(*_args) ⇒ Object
The parameters of this method will depend on the
typeof usecase.
Methods included from CliIdentify
Methods included from TargetModel
Methods included from Type
Methods inherited from CaseBase
#name, name_only_once!, original_name
Methods inherited from Base
<=>, created_at, 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
#initialize(usecases) ⇒ UseCase
rubocop:disable Lint/MissingSuper
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/eco/api/common/loaders/use_case.rb', line 16 def initialize(usecases) # rubocop:disable Lint/MissingSuper msg = "Expected Eco::API::UseCases. Given #{usecases.class}" raise msg unless usecases.is_a?(Eco::API::UseCases) usecases.define( name, type: type, model: target_model, &method(:main) ) end |
Instance Method Details
#cli_apply! ⇒ Object
39 40 41 |
# File 'lib/eco/api/common/loaders/use_case.rb', line 39 def cli_apply! self.class.cli! end |
#main(*_args) ⇒ Object
The parameters of this method will depend on the type of usecase.
35 36 37 |
# File 'lib/eco/api/common/loaders/use_case.rb', line 35 def main(*_args) raise 'You should implement this method' end |