Skip to content

Instantly share code, notes, and snippets.

@picatz
Last active April 23, 2018 21:52
Show Gist options
  • Save picatz/74d7670b13b0e432bf3e3cf32e952026 to your computer and use it in GitHub Desktop.
Save picatz/74d7670b13b0e432bf3e3cf32e952026 to your computer and use it in GitHub Desktop.
require 'command_lion'
CommandLion::App.run do
name "jwtear"
version "1.0.0"
description "Example description"
command :module_1 do
description "Example module description"
action do
if options[:switch1].given?
puts "Triggered 1 command with switch!"
else
puts "Triggered 1 command!"
end
end
option :switch1 do
description "Example module switch"
flag "--mod-switch"
end
end
command :module_2 do
description "Example module description"
action do
if options[:switch1].given?
puts "Triggered 2 command with switch!"
else
puts "Triggered 2 command!"
end
end
option :switch1 do
description "Example module switch"
flag "--mod-switch"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment