Class: SuperDiff::EqualityMatchers::Object

Inherits:
Base
  • Object
show all
Defined in:
lib/super_diff/equality_matchers/object.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

call, #call, #initialize

Constructor Details

This class inherits a constructor from SuperDiff::EqualityMatchers::Base

Class Method Details

.applies_to?(value) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/super_diff/equality_matchers/object.rb', line 4

def self.applies_to?(value)
  value.class == ::Object
end

Instance Method Details

#failObject



8
9
10
11
12
13
14
15
# File 'lib/super_diff/equality_matchers/object.rb', line 8

def fail
  "    Differing \#{Helpers.plural_type_for(actual)}.\n\n    \#{Helpers.style :deleted,  \"Expected: \#{expected.inspect}\"}\n    \#{Helpers.style :inserted, \"  Actual: \#{actual.inspect}\"}\n  OUTPUT\nend\n".strip