Skip to content

Conversation

@RubenIgnacio
Copy link
Contributor

Hi! Since I'm working from a fork, I realized I can't easily chain the PRs here. To keep things organized, I’ll send the changes one by one and wait for your feedback before opening the next one.

In this PR, I introduced a DEFAULT_MINOR constant to replace a recurring hardcoded "00" or 0.

Copy link
Member

@sunny sunny left a comment

Choose a reason for hiding this comment

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

LGTM!

MULTIPLIER_REGEXP = Regexp.new(format('^(.*?\d)(%s)\b([^\d]*)$', MULTIPLIER_SUFFIXES.keys.join('|')), 'i')

DEFAULT_DECIMAL_MARK = '.'.freeze
DEFAULT_MINOR = "00".freeze
Copy link
Member

Choose a reason for hiding this comment

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

Should we start marking these constants as private?

Suggested change
DEFAULT_MINOR = "00".freeze
DEFAULT_MINOR = "00".freeze
private_constant :DEFAULT_MINOR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but maybe it could be in a separate PR if there are other constants that need a visibility change as well. What other constants should be private?

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.

2 participants