Skip to content

Instantly share code, notes, and snippets.

@amkong
Created May 8, 2014 20:26
Show Gist options
  • Save amkong/3f23facf9f26a4e6a4d7 to your computer and use it in GitHub Desktop.
Save amkong/3f23facf9f26a4e6a4d7 to your computer and use it in GitHub Desktop.
Qualified Method_of_methods
def experience_check(candidates, years_of_experience)
candidates.select {|candidate| candidate[:years_of_experience] >= years_of_experience}
end
def min_github_points_check(candidates, min_github_points)
candidates.select {|candidate| candidate[:github_points] >= min_github_points}
end
def language_check(candidates)
candidates.select {|candidate| candidate[:languages].include?('Ruby') || candidate[:languages].include?('Python')}
end
def applied_check(candidates, date_applied)
candidates.select {|candidate| candidate[:date_applied] <= date_applied.days.ago.to_date}
end
def age_check(candidates, age)
candidates.select {|candidate| candidate[:age] >= age}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment