Module: AssLauncher::Cmd::Abstract::Option::Format Private

Included in:
Cli
Defined in:
lib/ass_launcher/cmd.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Mixin Command option

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



441
442
443
444
445
446
447
448
# File 'lib/ass_launcher/cmd.rb', line 441

def self.included(base)
  base.option ['--format', '-f'], 'ascii|csv', 'output format',
              default: :ascii do |s|
    fail ArgumentError, "Invalid format `#{s}'" unless\
      %w[csv ascii].include? s
    s.to_sym
  end
end