Class: Ossert::Stats::CommunityQuarter

Inherits:
Base
  • Object
show all
Defined in:
lib/ossert/stats/community_quarter.rb

Instance Method Summary collapse

Methods inherited from Base

#<<, absolute_attributes, attributes, attributes_names, config, create_attributes_accessors, define_counts, define_ints, define_percent, #initialize, #median, #metric_values, metrics, #metrics_to_hash, #to_hash, #to_json, uniq_attributes

Constructor Details

This class inherits a constructor from Ossert::Stats::Base

Instance Method Details

#download_divergenceObject



23
24
25
# File 'lib/ossert/stats/community_quarter.rb', line 23

def download_divergence
  (delta_downloads.to_f / (1 + total_downloads.to_f)) * 100.0
end

#total_downloads_countObject



19
20
21
# File 'lib/ossert/stats/community_quarter.rb', line 19

def total_downloads_count
  delta_downloads
end

#users_involved_no_stars_countObject



15
16
17
# File 'lib/ossert/stats/community_quarter.rb', line 15

def users_involved_no_stars_count
  (users_involved - stargazers).count
end