require 'imw' require 'optparse' module IMW RunnerError = Class.new(IMW::Error) class Runner DEFAULT_OPTIONS = { :requires => [], :selectors => [], :dry_run => false } attr_reader :args, :options def initialize *args @args = args @options = DEFAULT_OPTIONS.dup parser.parse!(args) end def parser OptionParser.new do |opts| opts.banner = "usage: imw [OPTIONS] TASK" opts.separator <