Module: Hanami::Commands::Command::ClassMethods

Defined in:
lib/hanami/commands/command.rb

Overview

Class level interface

Since:

  • 0.9.0

Instance Method Summary collapse

Instance Method Details

#register_as(name) ⇒ Object

Since:

  • 0.9.0


25
26
27
# File 'lib/hanami/commands/command.rb', line 25

def register_as(name)
  Hanami::Components.register(name, self)
end

#requirementsObject

Since:

  • 0.9.0


33
34
35
# File 'lib/hanami/commands/command.rb', line 33

def requirements
  @_requirements
end

#requires(*names) ⇒ Object

Since:

  • 0.9.0


29
30
31
# File 'lib/hanami/commands/command.rb', line 29

def requires(*names)
  requirements.concat(names)
end