class Findbugs2Checkstyle::CLI
Public Instance Methods
convert()
click to toggle source
# File lib/findbugs_2_checkstyle/cli.rb, line 9 def convert data = fetch_data(options) xml = parse(data) checkstyle = trans(xml) checkstyle.write(STDOUT, 2) end
fetch_data(options)
click to toggle source
# File lib/findbugs_2_checkstyle/cli.rb, line 17 def fetch_data(options) data = \ if options[:data] options[:data] elsif options[:file] File.read(options[:file]) elsif !$stdin.tty? ARGV.clear ARGF.read end fail NoInputError if !data || data.empty? data end