Class: Mimas::CLI::Commands::BaseCommand

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
SSH, Template, Terminal::Printer
Defined in:
lib/mimas/base_command.rb

Direct Known Subclasses

Archive, Console, Init, Install, Provision, Push, Setup

Constant Summary

Constants included from Template

Template::BASE_DIRECTORY

Instance Method Summary collapse

Methods included from Terminal::Printer

#ask, #say

Methods included from SSH

#ssh

Methods included from Template

#copy_file, lookup_paths, #read_file, #template

Constructor Details

#initializeBaseCommand

Returns a new instance of BaseCommand.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/mimas/base_command.rb', line 7

def initialize
  super

  if Config.current
    @hooks = Hooks.new
    @hooks.merge(Config.current.hooks)

    Plugins.fetch.each do |plugin|
      @hooks.merge plugin.hooks if plugin.respond_to?(:hooks)
    end
  end
end