Exception: Ecoportal::API::Common::Content::ArrayModel::TypeMismatchedComparison

Inherits:
Exception
  • Object
show all
Defined in:
lib/ecoportal/api/common/content/array_model.rb

Instance Method Summary collapse

Constructor Details

#initialize(this: nil, that: msg = "Trying to compare objects with different behavior.") ⇒ TypeMismatchedComparison

Returns a new instance of TypeMismatchedComparison.



9
10
11
12
13
14
15
16
17
# File 'lib/ecoportal/api/common/content/array_model.rb', line 9

def initialize (this: nil, that: msg = "Trying to compare objects with different behavior.")
  if this
    msg += " From object with 'order_matters: #{this.order_matters?}' and 'uniq: #{this.uniq?}'."
  end
  if that
    msg += " To object where 'order_matters: #{that.order_matters?}' and 'uniq: #{that.uniq?}'."
  end
  super(msg)
end