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