Class: ConvenientService::Support::Command Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/support/command.rb

Overview

This class is abstract.

Subclass and override #initialize and #call to implement a Command.

Direct Known Subclasses

Commands::IsService, Commands::IsServiceClass, Common::Plugins::CanHaveUserProvidedEntity::Commands::FindOrCreateEntity, Common::Plugins::HasInstanceProxy::Commands::CreateInstanceProxyClass, Common::Plugins::HasInternals::Commands::CreateInternalsClass, Core::Entities::Config::Commands::TrackMethodMissingCommitTrigger, Core::Entities::Config::Entities::Concerns::Entities::Middleware::Commands::CastMiddleware, Core::Entities::Config::Entities::MethodMiddlewares::Commands::GenerateStackName, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Caller::Commands::CastCaller, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Caller::Commands::DefineMethodCallers, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Container::Commands::CastContainer, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Container::Commands::ResolveMethodsMiddlewaresCallers, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middlewares::Base::Commands::CreateObservableMiddleware, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middlewares::Chain::Commands::CreateObservableMiddleware, Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middlewares::Chain::Commands::NormalizeEnv, Feature::Plugins::CanHaveEntries::Commands::DefineEntries, Feature::Plugins::CanHaveEntries::Commands::DefineEntry, RSpec::Helpers::Classes::StubService, RSpec::Helpers::Classes::WrapMethod, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedCodePart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedDataPart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedMessagePart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedParts, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedServicePart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedStatusPart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateExpectedStepPart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateGotParts, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateGotServicePart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Base::Commands::GenerateGotStepPart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Error::Commands::GenerateGotJsendAttributesPart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Failure::Commands::GenerateGotJsendAttributesPart, RSpec::Matchers::Classes::Results::Base::Entities::Printers::Success::Commands::GenerateGotJsendAttributesPart, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResult, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultCode, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultData, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultMessage, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultOriginalService, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultService, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultStatus, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultStep, RSpec::Matchers::Classes::Results::Base::Entities::Validator::Commands::ValidateResultType, RSpec::PrimitiveHelpers::Classes::IgnoringException, RSpec::PrimitiveHelpers::Classes::InThreads, RSpec::PrimitiveMatchers::Classes::DelegateTo::Commands::GeneratePrintableMethod, RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::Arguments::Commands::ApplyStubToTrackDelegations, RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::Arguments::Commands::GeneratePrintableArguments, ConvenientService::Service::Plugins::CanHaveSteps::Commands::CreateStepClass, ConvenientService::Service::Plugins::CanHaveSteps::Commands::IsStep, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethod, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethodDirection, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::CastMethodFactory, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Commands::DefineMethodInContainer, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::CastParams, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::ExtractParams, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeMethodStep::Commands::CalculateMethodResult, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeServiceStep::Commands::CalculateServiceResult, ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::FetchAllServicesStubbedResultsCache, ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::FetchServiceStubbedResultsCache, ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::GetServiceStubbedResult, ConvenientService::Service::Plugins::CanHaveStubbedResults::Commands::SetServiceStubbedResult, ConvenientService::Service::Plugins::CollectsServicesInException::Commands::ExtractServiceDetails, ConvenientService::Service::Plugins::HasJSendResult::Commands::CreateResultClass, ConvenientService::Service::Plugins::HasJSendResult::Commands::IsResult, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Commands::CastJSendAttributes, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Commands::CreateCodeClass, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Commands::CreateDataClass, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Commands::CreateMessageClass, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Commands::CreateStatusClass, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Code::Commands::IsCode, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data::Commands::IsData, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Data::Plugins::HasInspect::Commands::GenerateInspectOutput, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Message::Commands::IsMessage, ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Status::Commands::IsStatus, ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Success::Commands::RefuteKwargsContainJSendAndExtraKeys, ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Code::Commands::GenerateLines, ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Code::Commands::GenerateMethodStepLines, ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Code::Commands::GenerateResultLines, ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Code::Commands::GenerateServiceLines, ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Code::Commands::GenerateServiceStepLines, ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatBacktrace, ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatCause, ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatClass, ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatException, ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatLine, ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatMessage, DependencyContainer::Commands::AssertValidContainer, DependencyContainer::Commands::AssertValidMethod, DependencyContainer::Commands::AssertValidScope, DependencyContainer::Commands::CreateMethodsModule, DependencyContainer::Commands::ImportMethod, Utils::Array::ContainExactly, Utils::Array::DropWhile, Utils::Array::FindLast, Utils::Array::FindYield, Utils::Array::KeepAfter, Utils::Array::LimitedPush, Utils::Array::Merge, Utils::Array::Rjust, Utils::Array::Wrap, Utils::Bool::ToBool, Utils::Class::DisplayName, Utils::Class::GetAttachedObject, Utils::Hash::AssertValidKeys, Utils::Hash::Except, Utils::Hash::TripleEqualityCompare, Utils::Method::Defined, Utils::Module::ClassMethodDefined, Utils::Module::FetchOwnConst, Utils::Module::GetOwnConst, Utils::Module::GetOwnInstanceMethod, Utils::Module::HasOwnInstanceMethod, Utils::Module::IncludeModule, Utils::Module::InstanceMethodDefined, Utils::Object::ClampClass, Utils::Object::DuckClass, Utils::Object::GetOwnMethod, Utils::Object::InstanceVariableDelete, Utils::Object::InstanceVariableFetch, Utils::Object::MemoizeIncludingFalsyValues, Utils::Object::ResolveType, Utils::Object::SafeSend, Utils::Proc::Conjunct, Utils::Proc::Display, Utils::Proc::ExecConfig, Utils::String::Camelize, Utils::String::Demodulize, Utils::String::Enclose, Utils::String::Split, Utils::String::Truncate

Defined Under Namespace

Modules: Exceptions

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializevoid

This method is abstract.


51
52
# File 'lib/convenient_service/support/command.rb', line 51

def initialize(...)
end

Class Method Details

.[]Object

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.



42
43
44
# File 'lib/convenient_service/support/command.rb', line 42

def [](...)
  call(...)
end

.callObject

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.



25
26
27
# File 'lib/convenient_service/support/command.rb', line 25

def call(...)
  new(...).call
end

Instance Method Details

#callObject

This method is abstract.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Raises:



59
60
61
# File 'lib/convenient_service/support/command.rb', line 59

def call
  ::ConvenientService.raise Exceptions::CallIsNotOverridden.new(command: self)
end