Class: Request::None

Inherits:
Object
  • Object
show all
Defined in:
app/models/request/none.rb

Overview

Null object for situations where you wish to explicitly indicate you have no request. (In contrast to nil, which could too easily result from a bug) Added to allow Pooling to indicate there should ne no outer request, without risking incorrect behaviour if we pass in nil unintentionally.

Instance Method Summary collapse

Instance Method Details

#aliquot_attributesObject

Normal requests can inject attributes into aliquots created by transfer requests associated with the request. In the case of Request::None we return an empty hash, which ensures that no additional attributes are injected



21
22
23
# File 'app/models/request/none.rb', line 21

def aliquot_attributes
  {}
end

#idObject



13
14
15
# File 'app/models/request/none.rb', line 13

def id
  nil
end

#submission_idObject



9
10
11
# File 'app/models/request/none.rb', line 9

def submission_id
  nil
end