Sha256: 0f55994485b4831c276c61115e6f36e354f0ac896abd51cc773fc26cc1fcd62a
Contents?: true
Size: 591 Bytes
Versions: 1
Compression:
Stored size: 591 Bytes
Contents
#!/usr/bin/env ruby require 'ds_watcher' require 'optparse' w = DsWatcher::Watcher.new option_parser = OptionParser.new do |opt| opt.banner = "Usage: option_parser COMMAND [OPTIONS]" opt.separator "" opt.separator "Commands" opt.separator " newest: Get the newest chapter" opt.separator "" opt.separator " recent: Get the recent chapters" opt.separator "Options" opt.on("-h", "--help", "help") do puts option_parser end end option_parser.parse! case ARGV[0] when "newest" puts w.new_chapter when "recent" puts w.recent_chapters else puts option_parser end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ds_watcher-0.1.0 | bin/watcher |