Class: MismatchInspectable::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/mismatch_inspectable/formatter/formatter.rb

Direct Known Subclasses

ArrayFormatter, HashFormatter, ObjectFormatter

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mismatchesObject (readonly)

Returns the value of attribute mismatches.



3
4
5
# File 'lib/mismatch_inspectable/formatter/formatter.rb', line 3

def mismatches
  @mismatches
end

Instance Method Details

#add_mismatch(prefix, attribute, curr_val, other_val) ⇒ Object

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/mismatch_inspectable/formatter/formatter.rb', line 5

def add_mismatch(prefix, attribute, curr_val, other_val)
  raise NotImplementedError
end

#merge_mismatches(nested_mismatches) ⇒ Object



9
10
11
# File 'lib/mismatch_inspectable/formatter/formatter.rb', line 9

def merge_mismatches(nested_mismatches)
  process_mismatches(nested_mismatches) unless no_nested_mismatches?(nested_mismatches)
end