Class: Wrong::FailureMessage::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/wrong/failure_message.rb

Direct Known Subclasses

ArrayDiff, StringComparisonFormatter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(predicate) ⇒ Formatter

Returns a new instance of Formatter.



33
34
35
# File 'lib/wrong/failure_message.rb', line 33

def initialize(predicate)
  @predicate = predicate
end

Instance Attribute Details

#predicateObject (readonly)

Returns the value of attribute predicate.



31
32
33
# File 'lib/wrong/failure_message.rb', line 31

def predicate
  @predicate
end

Class Method Details

.registerObject



27
28
29
# File 'lib/wrong/failure_message.rb', line 27

def self.register
  Wrong::FailureMessage.register_formatter(self)
end

Instance Method Details

#describe(valence) ⇒ Object



37
38
39
# File 'lib/wrong/failure_message.rb', line 37

def describe(valence)

end

#match?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/wrong/failure_message.rb', line 41

def match?
  false
end