Last active
October 12, 2015 15:38
-
-
Save aussielunix/4049281 to your computer and use it in GitHub Desktop.
I think I could become addicted to methadone
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
#!/usr/bin/env ruby | |
require 'methadone' | |
require 'pp' | |
include Methadone::Main | |
include Methadone::CLILogging | |
# Main logic in here | |
# | |
main do |queue,subject,requestors| | |
pp options | |
debug "debug message goes here" # Calls logger.debug | |
info "info message goes here" # Calls logger.info | |
error "error message goes here" # Calls logger.error | |
end | |
# ui | |
# | |
description "You won't believe it's not butter." | |
on('-q QUEUE', '--queue QUEUE', 'The queue to create ticket in') | |
on('-s SUBJECT', '--subject SUBJECT', 'The subject of the ticket') | |
on('-r REQUESTORS', '--requestors REQUESTORS', 'String containing comma separated email addresses') | |
# add a --log-level switch | |
use_log_level_option | |
# Fire ze missile | |
# | |
go! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment