Class: Railsdock::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/railsdock/cli.rb

Overview

Handle the application command line parsing and the dispatch to various command objects

Constant Summary collapse

Error =

Error raised by this runner

Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#install(app_name = nil) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/railsdock/cli.rb', line 24

def install(app_name = nil)
  if options[:help]
    invoke :help, ['install']
  else
    require_relative 'commands/install'
    Railsdock::Commands::Install.new(options.merge(app_name: app_name)).execute
  end
end

#versionObject



15
16
17
18
# File 'lib/railsdock/cli.rb', line 15

def version
  require_relative 'version'
  puts "Railsdock v#{Railsdock::VERSION}"
end