Class: CabezaDeTermo::JsonSpec::BlockMessageFormatter

Inherits:
MessageFormatter show all
Defined in:
lib/cabeza-de-termo/json-spec/message-formatters/block-message-formatter.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ BlockMessageFormatter

Returns a new instance of BlockMessageFormatter.



6
7
8
# File 'lib/cabeza-de-termo/json-spec/message-formatters/block-message-formatter.rb', line 6

def initialize(block)
	@block = block
end

Instance Method Details

#message_on(expectation, value_holder) ⇒ Object



10
11
12
# File 'lib/cabeza-de-termo/json-spec/message-formatters/block-message-formatter.rb', line 10

def message_on(expectation, value_holder)
	@block.call(expectation, value_holder)
end