Class: Wavesync::Commands::Analyze

Inherits:
Command
  • Object
show all
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

Methods inherited from Command

#parse_options

Instance Method Details

#runObject

: () -> void



16
17
18
19
20
21
22
# File 'lib/wavesync/commands/analyze.rb', line 16

def run
  options, config = parse_options(banner: 'Usage: wavesync analyze [options]') do |opts, opts_hash|
    opts.on(*FORCE_OPTION.to_a) { opts_hash[:overwrite] = true }
  end

  Wavesync::Analyzer.new(config.library).analyze(overwrite: options[:overwrite] || false)
end