Class: Munge::Cli::Dispatch

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

Overview

This class directs commandline flags to appropriate classes

Instance Method Summary collapse

Instance Method Details

#buildObject



25
26
27
28
29
# File 'lib/munge/cli/dispatch.rb', line 25

def build
  production!

  Commands::Build.new(bootloader, **symbolized_options, build_root: ENV["BUILD_ROOT"]).call
end

#cleanObject



84
85
86
87
88
# File 'lib/munge/cli/dispatch.rb', line 84

def clean
  production!

  Commands::Clean.new(bootloader, **symbolized_options, build_root: ENV["BUILD_ROOT"]).call
end

#init(path) ⇒ Object



6
7
8
# File 'lib/munge/cli/dispatch.rb', line 6

def init(path)
  Commands::Init.new(path).call
end

#serverObject



63
64
65
66
67
# File 'lib/munge/cli/dispatch.rb', line 63

def server
  development!

  Commands::Server.new(bootloader, **symbolized_options).call
end

#updateObject



93
94
95
96
97
# File 'lib/munge/cli/dispatch.rb', line 93

def update
  development!

  Commands::Update.new(bootloader, current_working_directory).call
end

#versionObject



101
102
103
# File 'lib/munge/cli/dispatch.rb', line 101

def version
  puts "munge #{Munge::VERSION}"
end

#viewObject



42
43
44
45
46
# File 'lib/munge/cli/dispatch.rb', line 42

def view
  production!

  Commands::View.new(bootloader, **symbolized_options, build_root: ENV["BUILD_ROOT"]).call
end