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. = <<~END #{name}: #{description} Usage: circuit-patch #{name} [options] patch1.sysex [patch2.sysex ...] Options: END opts.on('-oFILENAME', '--output=FILENAME', 'Output filename', "Default: #{DEFAULT_OPTIONS[:output]}", String) do |v| [:output] = v end opts.on('-h', '--help', 'Print this help') do puts opts return end end.parse!(args) join , args end |