Module: AssLauncher::Cmd::Abstract::Option::Query 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.



266
267
268
269
270
271
272
273
274
275
# File 'lib/ass_launcher/cmd.rb', line 266

def self.included(base)
  base.option %w[--query -q], 'REGEX',
              'regular expression based filter' do |s|
    begin
      Regexp.new(s, Regexp::IGNORECASE)
    rescue RegexpError => e
      fail ArgumentError, e.message
    end
  end
end