Class: Munge::Cli::Dispatch
- Inherits:
-
Thor
- Object
- Thor
- Munge::Cli::Dispatch
- Defined in:
- lib/munge/cli/dispatch.rb
Overview
This class directs commandline flags to appropriate classes
Instance Method Summary collapse
- #build ⇒ Object
- #clean ⇒ Object
- #init(path) ⇒ Object
- #server ⇒ Object
- #update ⇒ Object
- #version ⇒ Object
- #view ⇒ Object
Instance Method Details
#build ⇒ Object
25 26 27 28 29 |
# File 'lib/munge/cli/dispatch.rb', line 25 def build production! Commands::Build.new(bootloader, **, build_root: ENV["BUILD_ROOT"]).call end |
#clean ⇒ Object
84 85 86 87 88 |
# File 'lib/munge/cli/dispatch.rb', line 84 def clean production! Commands::Clean.new(bootloader, **, 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 |
#server ⇒ Object
63 64 65 66 67 |
# File 'lib/munge/cli/dispatch.rb', line 63 def server development! Commands::Server.new(bootloader, **).call end |
#update ⇒ Object
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 |
#version ⇒ Object
101 102 103 |
# File 'lib/munge/cli/dispatch.rb', line 101 def version puts "munge #{Munge::VERSION}" end |
#view ⇒ Object
42 43 44 45 46 |
# File 'lib/munge/cli/dispatch.rb', line 42 def view production! Commands::View.new(bootloader, **, build_root: ENV["BUILD_ROOT"]).call end |