Class: Mimas::CLI::Commands::Console

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/mimas/commands/console.rb

Constant Summary

Constants included from Template

Template::BASE_DIRECTORY

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

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

This class inherits a constructor from Mimas::CLI::Commands::BaseCommand

Instance Method Details

#call(server_name:, site: :default) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/mimas/commands/console.rb', line 10

def call(server_name:, site: :default)
  server  = Config.current.servers[server_name.to_sym]
  site    = Config.current.sites[site.to_sym]

  raise "Please add a `console` directive to your config file" unless site.respond_to?(:console)

  server.start_console(site)
end