Class: CircuitPatchTools::Commands::Join
- Inherits:
-
Object
- Object
- CircuitPatchTools::Commands::Join
- Defined in:
- lib/circuit_patch_tools/commands/join.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ output: 'patches.sysex' }
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
15 16 17 |
# File 'lib/circuit_patch_tools/commands/join.rb', line 15 def description 'join up to 64 patches into a single sysex file' end |
#name ⇒ Object
11 12 13 |
# File 'lib/circuit_patch_tools/commands/join.rb', line 11 def name 'join' end |
#run(args) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/circuit_patch_tools/commands/join.rb', line 19 def run(args) = DEFAULT_OPTIONS.dup OptionParser.new do |opts| opts. = " \#{name}: \#{description}\n\n Usage: circuit-patch \#{name} [options] patch1.sysex [patch2.sysex ...]\n\n Options:\n END\n opts.on('-oFILENAME', '--output=FILENAME',\n 'Output filename',\n \"Default: \#{DEFAULT_OPTIONS[:output]}\",\n String) do |v|\n options[:output] = v\n end\n opts.on('-h', '--help', 'Print this help') do\n puts opts\n return\n end\n end.parse!(args)\n\n join options, args\nend\n" |