Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sadfuzzy
Created March 11, 2019 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadfuzzy/04dacc242cc6a2b61996c6cd670fa1d8 to your computer and use it in GitHub Desktop.
Save sadfuzzy/04dacc242cc6a2b61996c6cd670fa1d8 to your computer and use it in GitHub Desktop.
test task
class Developer
# You need to implement Developer class so DataBase#find_developer method would not fail.
end
class DataBase
def find_developer(platform: :ruby, region: :london)
all_developers(platform, region).select do |you|
you.are.crazy
.and { your.skill_level is :high }
.and { you.are.not.in :plumbee }
.and { you.love 'ruby', 'rails' }
.and { want 'fun', 'money' }
.and.if you do
your work well
end
end
end
private
def all_developers(*_)
[Developer.new]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment