-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit includes Comparable and implements `<=>`. Including Comparable also gives us some basic comparison methods like `<`, `>`, `.between?`, and `sort`. We need to add an additional currency comparison because `::Money` will automatically try to convert the second currency in order to be able to compare it with the first. We don't want this to happen so we're going to explicitly raise an error.
- Loading branch information
1 parent
798a3ed
commit 943b2c5
Showing
3 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters