class Xccov
Constants
- VERSION
Public Class Methods
new()
click to toggle source
@example
xccov = Xccov.new xccov.help json = xccov.view '--only-targets', '--json', '/path/to/Build/Logs/Test/*.xccovreport' parsed = Xccov::Parse.new(json: json) parsed.targets_line_coverage["test.examples.app"] #=> 0.35
# File lib/xccov-parse.rb, line 14 def initialize @xccov = "#{get_xcrun} xccov" end
Private Instance Methods
get_xcrun()
click to toggle source
# File lib/xccov-parse.rb, line 43 def get_xcrun cmd = `which xcrun`.strip return cmd unless cmd.empty? raise "You should install xcrun" end
method_missing(method, *args, &_block)
click to toggle source
Calls superclass method
# File lib/xccov-parse.rb, line 31 def method_missing(method, *args, &_block) if respond_to_missing? run(@xccov, method, args) else super end end
respond_to_missing?()
click to toggle source
# File lib/xccov-parse.rb, line 39 def respond_to_missing? true end
run(*args)
click to toggle source
# File lib/xccov-parse.rb, line 20 def run(*args) cmd = args.join ' ' sto, ste, status = Open3.capture3(cmd) if status.success? sto else puts ste raise(sto) end end