Module: GemsBond::Examination
- Included in:
- Gem
- Defined in:
- lib/gems_bond/examination.rb
Overview
Examines gem sanity
Constant Summary collapse
- SCORES =
YAML.safe_load(File.read(File.join(File.dirname(__FILE__), "scores.yml")))
- BOUNDARIES =
SCORES["boundaries"]
- RESULTS =
SCORES["results"]
Instance Method Summary collapse
-
#activity_score ⇒ Integer?
Returns activity score.
-
#average_score ⇒ Integer?
Returns average score.
-
#popularity_score ⇒ Integer?
Returns popularity score.
Instance Method Details
#activity_score ⇒ Integer?
Returns activity score
|
# File 'lib/gems_bond/examination.rb', line 12
|
#average_score ⇒ Integer?
Returns average score
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gems_bond/examination.rb', line 23 RESULTS.each do |result, values| define_method("#{result}_score") do memoize("#{result}_score") do weighted_average( values.map do |key, weighting| [__send__("#{key}_score"), weighting] end ) end end end |
#popularity_score ⇒ Integer?
Returns popularity score
|
# File 'lib/gems_bond/examination.rb', line 16
|