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

moved logic to calculation #381

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Tr4in
Copy link
Contributor

@Tr4in Tr4in commented Sep 11, 2017

Closes #370

@ghost ghost assigned Tr4in Sep 11, 2017
@ghost ghost added the needs review label Sep 11, 2017
Copy link
Contributor

@tamacodechi tamacodechi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 🌮 Just some thoughts ✌️

@@ -242,6 +242,10 @@ def calculate_attributes(version)
end

def calculate_amounts
# First: Remove false positives
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comment please 🙈
If you want to make it super clear why you have these grouped, then make a separate method that runs these two like

def remove_false_positives
    PriceCalculation.remove_quantities
    PriceCalculation.remove_dates
end

The code should be so clear that it explains itself without comments 😉

You could also have one method in the price calculation for removing false positives. Seeing as other terms may soon have this too #369 it may be good to have these defined in the calculations and then call the methods from one method before all the calculations. What do you think? 😊

@tamacodechi
Copy link
Contributor

Also please please the rubocop 🤖 💕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants