Sha256: c59650bae8213e8738b4663897fff6730141990fa43204ca865225f7a780a017

Contents?: true

Size: 619 Bytes

Versions: 28

Compression:

Stored size: 619 Bytes

Contents

require 'fitting/statistics/template'

module Fitting
  class Statistics
    def initialize(tested_requests)
      @tested_requests = tested_requests
    end

    def save
      make_dir('fitting')
      if Fitting.configuration.is_a?(Array)
        Fitting.configuration.each do |config|
          make_dir("fitting/#{config.title}")
          Fitting::Statistics::Template.new(@tested_requests, config).save
        end
      else
        Fitting::Statistics::Template.new(@tested_requests, Fitting.configuration).save
      end
    end

    def make_dir(dir_name)
      FileUtils.mkdir_p(dir_name)
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
fitting-2.18.3 lib/fitting/statistics.rb
fitting-2.18.2 lib/fitting/statistics.rb
fitting-2.18.1 lib/fitting/statistics.rb
fitting-2.18.0 lib/fitting/statistics.rb
fitting-2.17.0 lib/fitting/statistics.rb
fitting-2.16.1 lib/fitting/statistics.rb
fitting-2.16.0 lib/fitting/statistics.rb
fitting-2.15.0 lib/fitting/statistics.rb
fitting-2.14.1 lib/fitting/statistics.rb
fitting-2.14.0 lib/fitting/statistics.rb
fitting-2.13.1 lib/fitting/statistics.rb
fitting-2.13.0 lib/fitting/statistics.rb
fitting-2.12.1 lib/fitting/statistics.rb
fitting-2.12.0 lib/fitting/statistics.rb
fitting-2.11.0 lib/fitting/statistics.rb
fitting-2.10.0 lib/fitting/statistics.rb
fitting-2.9.1 lib/fitting/statistics.rb
fitting-2.9.0 lib/fitting/statistics.rb
fitting-2.8.1 lib/fitting/statistics.rb
fitting-2.8.0 lib/fitting/statistics.rb