Exception: SuperDiff::NoDifferAvailableError
- Inherits:
-
StandardError
- Object
- StandardError
- SuperDiff::NoDifferAvailableError
- Defined in:
- lib/super_diff/no_differ_available_error.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
-
#expected ⇒ Object
Returns the value of attribute expected.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ NoDifferAvailableError
constructor
A new instance of NoDifferAvailableError.
Constructor Details
#initialize ⇒ NoDifferAvailableError
Returns a new instance of NoDifferAvailableError.
13 14 15 16 17 18 19 20 |
# File 'lib/super_diff/no_differ_available_error.rb', line 13 def initialize super(<<-MESSAGE) There is no differ available to handle an "expected" value of type #{expected.class} and an "actual" value of type #{actual.class}. MESSAGE end |
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual.
11 12 13 |
# File 'lib/super_diff/no_differ_available_error.rb', line 11 def actual @actual end |
#expected ⇒ Object
Returns the value of attribute expected.
11 12 13 |
# File 'lib/super_diff/no_differ_available_error.rb', line 11 def expected @expected end |
Class Method Details
.create(expected, actual) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/super_diff/no_differ_available_error.rb', line 3 def self.create(expected, actual) allocate.tap do |error| error.expected = expected error.actual = actual error.__send__(:initialize) end end |