Class: LabWhereClient::Scan
- Includes:
- EndpointCreateActions
- Defined in:
- lib/lab_where_client.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Scan
constructor
A new instance of Scan.
- #response_message ⇒ Object
- #valid? ⇒ Boolean
Methods included from EndpointCreateActions
Methods inherited from Endpoint
Constructor Details
#initialize(params) ⇒ Scan
Returns a new instance of Scan.
134 135 136 137 |
# File 'lib/lab_where_client.rb', line 134 def initialize(params) @message = params['message'] @errors = params['errors'] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
130 131 132 |
# File 'lib/lab_where_client.rb', line 130 def errors @errors end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
130 131 132 |
# File 'lib/lab_where_client.rb', line 130 def @message end |
Class Method Details
.creation_params(params) ⇒ Object
143 144 145 146 147 |
# File 'lib/lab_where_client.rb', line 143 def self.creation_params(params) obj = params.dup obj[:labware_barcodes] = obj[:labware_barcodes].join("\n") { scan: obj } end |
Instance Method Details
#response_message ⇒ Object
139 140 141 |
# File 'lib/lab_where_client.rb', line 139 def @message end |
#valid? ⇒ Boolean
149 150 151 |
# File 'lib/lab_where_client.rb', line 149 def valid? @errors.nil? end |