class XcMetricsAggregator::CLI
Public Instance Methods
apps()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 28 def apps service = ProductsService.new puts service.structure(options[:available_path]).format Formatter.get_formatter(format) end
crowl()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 21 def crowl Crawler.execute() end
devices()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 36 def devices each_product do |product| product.try_to_open do |json| puts DevicesService .new(product.bundle_id, json) .structure .format Formatter.get_formatter(format) puts "\n\n" end end end
latest()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 99 def latest deviceid = options[:device] percentileid = options[:percentile] section = options[:section] puts LatestService .new(section, deviceid, percentileid) .structure .format Formatter.get_formatter(format) end
metrics()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 83 def metrics product.try_to_open do |json| structure = MetricsService .new(product.bundle_id, json) .structures(options[:section], options[:device], options[:percentile], options[:version]) puts structure.format Formatter.get_formatter(format) puts "\n\n" end end
percentiles()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 51 def percentiles each_product do |product| product.try_to_open do |json| puts PercentilesService .new(product.bundle_id, json) .structure .format Formatter.get_formatter(format) puts "\n\n" end end end
sections()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 67 def sections product.try_to_open do |json| puts CategoriesService .new(product.bundle_id, json) .structure .format Formatter.get_formatter(format) end end
Private Instance Methods
each_product() { |product| ... }
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 115 def each_product ProductsService.new.each_product(options[:bundle_ids]) { |product| yield product } end
format()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 111 def format OutputFormat.all.find { |v| v == options[:format] } end
product()
click to toggle source
# File lib/xc_metrics_aggregator.rb, line 121 def product ProductsService.new.target options[:bundle_id] end