Class: Munge::Cli::Dispatch

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

Instance Method Summary collapse

Instance Method Details

#buildObject



13
14
15
16
17
# File 'lib/munge/cli/dispatch.rb', line 13

def build
  ENV["MUNGE_ENV"] ||= "production"

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

#init(path) ⇒ Object



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

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

#serverObject



29
30
31
32
33
34
# File 'lib/munge/cli/dispatch.rb', line 29

def server
  ENV["MUNGE_ENV"]  ||= "development"
  ENV["BUILD_ROOT"] ||= "tmp/development-build"

  Commands::Server.new(bootloader).call
end

#versionObject



38
39
40
# File 'lib/munge/cli/dispatch.rb', line 38

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

#viewObject



22
23
24
25
26
# File 'lib/munge/cli/dispatch.rb', line 22

def view
  ENV["MUNGE_ENV"] ||= "production"

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