Permalink
Browse files

extract constants

  • Loading branch information...
1 parent 54fad7f commit 1fd14ee3704fbb70aff08b9d48b9ce1ff3a5e27c @despo committed Mar 24, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/estimate/project.rb
View
@@ -22,6 +22,9 @@ def process!
private
WORK_WEEK_DAYS = 5
+ HOLIDAYS_PER_DEVELOPER = 5
+ DEFAULT_DAY_POINTS = 1
+ DEFAULT_DEVELOPERS = 2
def incomplete_stories
@stories = @stories || project.stories.all(:story_type => story_points.keys, :current_state => incomplete_stati)
@@ -59,15 +62,15 @@ def points
end
def day_points
- @properties[:day_points] || 1
+ @properties[:day_points] || DEFAULT_DAY_POINTS
end
def holidays
- 5*developers
+ HOLIDAYS_PER_DEVELOPER*developers
end
def developers
- @properties[:developers] || 2
+ @properties[:developers] || DEFAULT_DEVELOPERS
end
def remaining_days

0 comments on commit 1fd14ee

Please sign in to comment.