Class: Wavesync::Commands::Analyze
- Defined in:
- lib/wavesync/commands/analyze.rb
Constant Summary collapse
- FORCE_OPTION =
Option.new(short: '-f', long: '--force', description: 'Overwrite existing BPM values')
Instance Method Summary collapse
-
#run ⇒ Object
: () -> void.
Methods inherited from Command
Instance Method Details
#run ⇒ Object
: () -> void
17 18 19 20 21 22 23 24 |
# File 'lib/wavesync/commands/analyze.rb', line 17 def run , config = (banner: 'Usage: wavesync analyze [options] [file_or_folder]') do |opts, opts_hash| opts.on(*FORCE_OPTION.to_a) { opts_hash[:overwrite] = true } end path = ARGV.shift Wavesync::Analyzer.new(config.library).analyze(overwrite: [:overwrite] || false, path: path) end |