Skip to content

Commit

Permalink
some more one liners instead of 3 liners
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob committed Apr 14, 2012
1 parent a26f9dd commit cd09303
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/models/sprint.rb
Expand Up @@ -56,14 +56,11 @@ def user_stories_not_in_progress
end

def user_stories_completed
user_stories.select do |each|
each.status == "completed"
end
user_stories.select {|each| each.status == "completed"}
end

def user_stories_estimated
estimated = user_stories.reject { |user_story| user_story.estimation.nil? }
estimated
user_stories.reject { |user_story| user_story.estimation.nil? }
end

def user_stories_in_progress
Expand All @@ -73,9 +70,7 @@ def user_stories_in_progress
end

def user_stories_for_user(user)
user_stories_in_progress.select do |each|
each.users.include?(user)
end
user_stories_in_progress.select {|each| each.users.include?(user)}
end

def end
Expand Down

0 comments on commit cd09303

Please sign in to comment.