Class: AuxiliaryRails::Application::Command Abstract

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Includes:
Concerns::Performable
Defined in:
lib/auxiliary_rails/application/command.rb

Overview

This class is abstract.

Instance Attribute Summary

Attributes included from Concerns::Performable

#performable_status

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Performable

#call, #ensure_empty_errors!, #ensure_empty_status!, #ensure_execution!, #failure!, #failure?, #on, #perform, #status?, #success!, #success?, #transaction

Methods included from Concerns::Errorable

#error!

Methods included from Concerns::Callable

#call, included

Class Method Details

.call(*args, **kws) ⇒ self

Returns:

  • (self)

See Also:

  • Corcerns::Callable


# File 'lib/auxiliary_rails/application/command.rb', line 31

.i18n_scopeSymbol

Defines ‘scope` for ActiveModel::Translation

Returns:

  • (Symbol)


38
39
40
# File 'lib/auxiliary_rails/application/command.rb', line 38

def i18n_scope
  :commands
end

.option(name, options = {}) ⇒ Object

Defines option using Dry::Initializer format.



# File 'lib/auxiliary_rails/application/command.rb', line 22

.param(name, options = {}) ⇒ Object

Defines param using Dry::Initializer format.

Parameters:

  • name (Symbol)
  • options (Hash) (defaults to: {})

See Also:



# File 'lib/auxiliary_rails/application/command.rb', line 13

Instance Method Details

#argumentsHash (protected)

Shortcut reader for attributes defined by Dry::Initializer

Returns:

  • (Hash)


48
49
50
# File 'lib/auxiliary_rails/application/command.rb', line 48

def arguments
  self.class.dry_initializer.attributes(self)
end