Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stanley Platform-code-test #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sglover98
Copy link

Refactored the orginial code provided to be more maintainable in the future. The approach that I took is more of an OOP approach and also utilized the principle of single responsibility. Each award was split into its own class of which contains their respective logic. In addition, new files were created that held the logic for any award constraints and exceptions.

new file: contraints/value_constraint.rb
modified: update_quality.rb
modified: update_quality_spec.rb
new file: updaters/blue_comp_up.rb
new file: updaters/blue_dist_plus_up.rb
new file: updaters/blue_first_up.rb
new file: updaters/blue_star_up.rb

	new file:   contraints/value_constraint.rb
	modified:   update_quality.rb
	modified:   update_quality_spec.rb
	new file:   updaters/blue_comp_up.rb
	new file:   updaters/blue_dist_plus_up.rb
	new file:   updaters/blue_first_up.rb
	new file:   updaters/blue_star_up.rb
@sglover98 sglover98 changed the title new file: contraints/exception.rb Stanley Platform-code-test Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant