Last active
April 23, 2018 21:52
-
-
Save picatz/74d7670b13b0e432bf3e3cf32e952026 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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