Class: Lookout::Expected::Module

Inherits:
Object show all
Defined in:
lib/lookout-3.0/expected/module.rb

Overview

Represents expected Modules.

Instance Method Summary collapse

Methods inherited from Object

#expect

Instance Method Details

#difference(actual) ⇒ Difference::Module?

Returns A difference report between ACTUAL and #expected unless they’re ‘#==` or ACTUAL is an #expected.

Parameters:

Returns:

  • (Difference::Module, nil)

    A difference report between ACTUAL and #expected unless they’re ‘#==` or ACTUAL is an #expected



8
9
10
11
# File 'lib/lookout-3.0/expected/module.rb', line 8

def difference(actual)
  Lookout::Difference::Module.new(actual, expected) unless
    expected == actual or expected === actual
end