Class: XRay::CMDRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/cmd_runner.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.runObject



78
79
80
# File 'lib/cmd_runner.rb', line 78

def self.run
  self.new.run
end

Instance Method Details

#runObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/cmd_runner.rb', line 82

def run
  options, files = XRay::CMDOptions.parse ARGV
  @core_runner = XRay::Runner.new(options)

  unless files.empty?
    files.each do |file|
      check_file file, options
    end
  else
    method = options[:type] ? :"check_#{options[:type]}" : :check
    print @core_runner.send(method, options[:text].utf8!), options
  end
end