Class: PickList::Pick
- Inherits:
-
Object
- Object
- PickList::Pick
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/pick_list/pick.rb
Overview
A pick represents an intended cherrypick. It pretty much maps exactly to a CherrypickRequest. Currently these are just plain old Ruby objects, but may end up being database backed in future if we update Cherrypicking to avoid the need for submissions. (Although now cherrypicking is billed this may be less useful)
Instance Attribute Summary collapse
- #project ⇒ Object
-
#source_receptacle ⇒ Object
Returns the value of attribute source_receptacle.
- #study ⇒ Object
-
#user ⇒ Object
writeonly
Sets the attribute user.
Instance Method Summary collapse
-
#order_options ⇒ Object
Used to help group compatible picks together into orders.
Instance Attribute Details
#project ⇒ Object
22 23 24 |
# File 'app/models/pick_list/pick.rb', line 22 def project @project || extract_project_from_source_receptacle end |
#source_receptacle ⇒ Object
Returns the value of attribute source_receptacle.
10 11 12 |
# File 'app/models/pick_list/pick.rb', line 10 def source_receptacle @source_receptacle end |
#study ⇒ Object
18 19 20 |
# File 'app/models/pick_list/pick.rb', line 18 def study @study || extract_study_from_source_receptacle end |
#user=(value) ⇒ Object (writeonly)
Sets the attribute user
11 12 13 |
# File 'app/models/pick_list/pick.rb', line 11 def user=(value) @user = value end |
Instance Method Details
#order_options ⇒ Object
Used to help group compatible picks together into orders
14 15 16 |
# File 'app/models/pick_list/pick.rb', line 14 def { study:, project: } end |