Class: Capwatch::CLI
- Inherits:
-
Object
- Object
- Capwatch::CLI
- Defined in:
- lib/capwatch/cli.rb
Class Method Summary collapse
Class Method Details
.parse(args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/capwatch/cli.rb', line 9 def self.parse(args) = OpenStruct.new .tick = 60 * 5 opt_parser = OptionParser.new do |opts| opts.on("-t", "--tick [Integer]", Integer, "Tick Interval") do |t| .tick = t end opts.on("-e", "--telegram-token=", String) do |val| .telegram = val end end opt_parser.parse!(args) end |