Class: RSMP::Collection

Inherits:
Data
  • Object
show all
Defined in:
lib/rsmp/collection.rb

Overview

Immutable snapshot returned by a completed collector.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages:, reached: [], matcher_status: {}) ⇒ Collection

Returns a new instance of Collection.



4
5
6
7
8
9
10
# File 'lib/rsmp/collection.rb', line 4

def initialize(messages:, reached: [], matcher_status: {})
  super(
    messages: messages.dup.freeze,
    reached: reached.dup.freeze,
    matcher_status: matcher_status.dup.freeze
  )
end

Instance Attribute Details

#matcher_statusObject (readonly)

Returns the value of attribute matcher_status

Returns:

  • the current value of matcher_status



3
4
5
# File 'lib/rsmp/collection.rb', line 3

def matcher_status
  @matcher_status
end

#messagesObject (readonly)

Returns the value of attribute messages

Returns:

  • the current value of messages



3
4
5
# File 'lib/rsmp/collection.rb', line 3

def messages
  @messages
end

#reachedObject (readonly)

Returns the value of attribute reached

Returns:

  • the current value of reached



3
4
5
# File 'lib/rsmp/collection.rb', line 3

def reached
  @reached
end