-
Notifications
You must be signed in to change notification settings - Fork 626
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
Cleanup core extensions #32
Comments
I like the idea of separate methods for handling simple strings versus complex ones. We'll probably need to think about a way of deprecating the old |
My idea, was to implement a simple guessing mechanism. |
so, something like a regex that detects anything other than digits, commas and periods? |
Exactly. |
I'm working on this. |
Done. All tests passes. I also took the time to cleanup the tests according to #28, increase documentation and test coverage. http://github.com/RubyMoney/money/compare/issue_32 I didn't include the fix for #30 because I prefer to work on one ticket at time. |
Cleanup core extensions (closed by 15460e9) |
From #25
There's an small exception to my feedback. We can think about adding more
.from_type
methods with the purpose to simplify the core extensions provided in thecore_extensions.rb
file. In this case, we can createString deserves a special mention here because a
String
is a very data-rich money format. In fact, there are two types of string representations:This is the reason why we can try to provide two methods:
The idea behind this change is to clean up the core_extensions by moving all the logic into the
Money
class.The text was updated successfully, but these errors were encountered: