Module: BandCamp::Cli::Options
- Defined in:
- lib/band_camp/cli/options.rb
Class Method Summary collapse
Class Method Details
.extract_from_argv ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/band_camp/cli/options.rb', line 6 def self.extract_from_argv = {} [:debug] = true OptionParser.new do |opts| opts. = "Usage: example.rb [options]" opts.on("-d", "--[no-]debug", "Output debug information") do |v| [:debug] = v end opts.on("-a", "--all", "If the url does not contain songs but links to tracks/albums: download all those") do |v| [:all] = v end end.parse! end |