Module: Tagmv::CommandLine

Extended by:
CommandLine
Included in:
CommandLine
Defined in:
lib/tagmv/command_line.rb

Instance Method Summary collapse

Instance Method Details

#parseObject



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/tagmv/command_line.rb', line 43

def parse
  return Choice.help if !Choice.choices[:reorder] && (Choice.choices.empty? || Choice.rest.empty?)

  opts = Hash.new
  opts[:files]   = Choice.rest
  opts[:dry_run] = Choice.choices[:dry_run]
  opts[:tags]    = Choice.choices[:tags]
  opts[:reorder] = Choice.choices[:reorder]
  opts[:skip_reorder]= Choice.choices[:skip_reorder]
  opts
end