Module: Monefy::Matchers
- Included in:
- Monefy
- Defined in:
- lib/monefy/matchers.rb
Overview
Encapsulate all the logic to compare differente Monefy instances
Instance Method Summary collapse
-
#!=(monefy) ⇒ Boolean
Check if two distinct Monefy instances are different.
-
#<(monefy) ⇒ Boolean
Check if one Monefy instance is less than another.
-
#==(monefy) ⇒ Boolean
Check if two distinct Monefy instances are equal.
-
#>(monefy) ⇒ Boolean
Check if one Monefy instance is greater than another.
Instance Method Details
#!=(monefy) ⇒ Boolean
Check if two distinct Monefy instances are different.
are equal.
31 32 33 34 35 |
# File 'lib/monefy/matchers.rb', line 31 def != monefy validate_monefy_instance(monefy) amount != converted_money_currency(monefy) end |
#<(monefy) ⇒ Boolean
Check if one Monefy instance is less than another.
false if not.
63 64 65 66 67 |
# File 'lib/monefy/matchers.rb', line 63 def < monefy validate_monefy_instance(monefy) amount < converted_money_currency(monefy) end |
#==(monefy) ⇒ Boolean
Check if two distinct Monefy instances are equal.
are different.
15 16 17 18 19 |
# File 'lib/monefy/matchers.rb', line 15 def == monefy validate_monefy_instance(monefy) amount == converted_money_currency(monefy) end |
#>(monefy) ⇒ Boolean
Check if one Monefy instance is greater than another.
false if not.
47 48 49 50 51 |
# File 'lib/monefy/matchers.rb', line 47 def > monefy validate_monefy_instance(monefy) amount > converted_money_currency(monefy) end |