Class: CrossSpec::ServiceMessage
- Defined in:
- lib/cross_spec/service_message.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Attributes inherited from Message
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(service:, data: nil, biomarkers: nil) ⇒ ServiceMessage
constructor
A new instance of ServiceMessage.
Methods inherited from Message
Constructor Details
#initialize(service:, data: nil, biomarkers: nil) ⇒ ServiceMessage
Returns a new instance of ServiceMessage.
3 4 5 6 |
# File 'lib/cross_spec/service_message.rb', line 3 def initialize(service:, data: nil, biomarkers: nil) super(data: data, biomarkers: biomarkers) @service = service end |
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
8 9 10 |
# File 'lib/cross_spec/service_message.rb', line 8 def service @service end |
Class Method Details
.from_json(json) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/cross_spec/service_message.rb', line 10 def self.from_json(json) new( service: json["service"], data: json["data"], biomarkers: json["biomarkers"] ) end |