Class: CrossSpec::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/cross_spec/message.rb

Direct Known Subclasses

ServiceMessage, TaskMessage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data: nil, biomarkers: nil) ⇒ Message

Returns a new instance of Message.



3
4
5
6
# File 'lib/cross_spec/message.rb', line 3

def initialize(data: nil, biomarkers: nil)
  @data = data
  @biomarkers = Array(biomarkers)
end

Instance Attribute Details

#biomarkersObject (readonly)

Returns the value of attribute biomarkers.



8
9
10
# File 'lib/cross_spec/message.rb', line 8

def biomarkers
  @biomarkers
end

#dataObject (readonly)

Returns the value of attribute data.



8
9
10
# File 'lib/cross_spec/message.rb', line 8

def data
  @data
end

Instance Method Details

#origin_biomarkerObject



10
11
12
# File 'lib/cross_spec/message.rb', line 10

def origin_biomarker
  @biomarkers.last
end