Browse files

Refactor FishingForecaster calculation implementation

  • Loading branch information...
1 parent 5145d41 commit 31e99d756d2435b7e8558fe5896cda07a1f0f35f Greg committed Aug 9, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/fishing_forecaster.rb
View
8 lib/fishing_forecaster.rb
@@ -15,7 +15,13 @@ def self.weather_forecaster=(forecaster)
def self.likelihood_of_catch
likelihood_of_rain = weather_forecaster.likelihood_of_rain
- 1-Math.sqrt(likelihood_of_rain)
+ calculate_likelihood_of_catch(likelihood_of_rain)
+ end
+
+protected
+
+ def self.calculate_likelihood_of_catch(rain)
+ 1-Math.sqrt(rain)
end
end

0 comments on commit 31e99d7

Please sign in to comment.