Created
November 2, 2017 11:55
-
-
Save michel/b7b1f588ded2dd023c1c70a525d48ef3 to your computer and use it in GitHub Desktop.
BEEQUIP vacancy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```class Candidate | |
attr_accessor :ambition, :location, :education, :skills | |
def initialize person | |
@ambition = person.ambition | |
@location = person.location | |
@education = person.education | |
@skills = person.skills | |
end | |
end | |
Person = Struct.new :ambition, :location, :education, :skills | |
you = Person.new 10000, :rotterdam, :wo, %i[ruby rails js] | |
beequip = Struct.new(:team).new [] | |
# USE FROM HERE | |
module BEEQUIP | |
class SoftwareEngineer < Candidate | |
def match? | |
[skills?, %i[rotterdam remote].include?(location), | |
ambition > 9000, %i[hbo wo].include?(education)].all? | |
end | |
private def skills? | |
(skills & %i[ruby rails js react redux postgres fintech graphql aws]).size >= 3 | |
end | |
end | |
end | |
beequip.team << you if BEEQUIP::SoftwareEngineer.new(you).match? # 😀 🦄 🔥 🎉 | |
# USE TO HERE | |
puts beequip.team | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment