Method: Redmineup::Currency#==

Defined in:
lib/redmineup/currency.rb

#==(other_currency) ⇒ Boolean

Compares self with other_currency and returns true if the are the same or if their id attributes match.

Examples:

c1 = Money::Currency.new(:usd)
c2 = Money::Currency.new(:jpy)
c1 == c1 #=> true
c1 == c2 #=> false

Parameters:

  • other_currency (Money::Currency)

    The currency to compare to.

Returns:

  • (Boolean)


305
306
307
# File 'lib/redmineup/currency.rb', line 305

def ==(other_currency)
  self.equal?(other_currency) || compare_ids(other_currency)
end