Class: Codeclimate::Collectors::Testing::StubMessagesFacade

Inherits:
MessagesFacade
  • Object
show all
Defined in:
lib/codeclimate/collectors/testing/stub_messages_facade.rb

Defined Under Namespace

Classes: NullMessagesImplementation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MessagesFacade

#<<

Constructor Details

#initialize(implementation: NullMessagesImplementation.new) ⇒ StubMessagesFacade

Returns a new instance of StubMessagesFacade.



11
12
13
14
15
# File 'lib/codeclimate/collectors/testing/stub_messages_facade.rb', line 11

def initialize(implementation: NullMessagesImplementation.new)
  super

  @received_messages = []
end

Instance Attribute Details

#received_messagesObject (readonly)

Returns the value of attribute received_messages.



5
6
7
# File 'lib/codeclimate/collectors/testing/stub_messages_facade.rb', line 5

def received_messages
  @received_messages
end

Instance Method Details

#send_message(message) ⇒ Object



17
18
19
20
# File 'lib/codeclimate/collectors/testing/stub_messages_facade.rb', line 17

def send_message(message)
  super
  received_messages << message
end