class Command
Public Class Methods
new(accepts, desc)
click to toggle source
# File bin/mkvtoolhelper, line 147 def initialize accepts, desc @accepts = accepts @desc = desc @action = Proc.new end
Public Instance Methods
accepts(line)
click to toggle source
# File bin/mkvtoolhelper, line 152 def accepts line @line = line @match = line.match(@accepts) end
action!()
click to toggle source
# File bin/mkvtoolhelper, line 156 def action! @action.call @match end
to_s()
click to toggle source
# File bin/mkvtoolhelper, line 159 def to_s "#{@accepts.inspect} - #{@desc}" end