Exception: LabwareCreators::ResourceInvalid

Inherits:
StandardError
  • Object
show all
Defined in:
app/models/labware_creators.rb

Overview

Raised on validation errors. We should return false instead if these are user error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ ResourceInvalid

Returns a new instance of ResourceInvalid.



7
8
9
10
# File 'app/models/labware_creators.rb', line 7

def initialize(resource)
  super(resource.errors.full_messages.join('; '))
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



12
13
14
# File 'app/models/labware_creators.rb', line 12

def resource
  @resource
end