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
23 24 25 |
# File 'app/models/pick_list/pick.rb', line 23 def project @project || extract_project_from_source_receptacle end |
#source_receptacle ⇒ Object
Returns the value of attribute source_receptacle.
11 12 13 |
# File 'app/models/pick_list/pick.rb', line 11 def source_receptacle @source_receptacle end |
#study ⇒ Object
19 20 21 |
# File 'app/models/pick_list/pick.rb', line 19 def study @study || extract_study_from_source_receptacle end |
#user=(value) ⇒ Object (writeonly)
Sets the attribute user
12 13 14 |
# File 'app/models/pick_list/pick.rb', line 12 def user=(value) @user = value end |
Instance Method Details
#order_options ⇒ Object
Used to help group compatible picks together into orders
15 16 17 |
# File 'app/models/pick_list/pick.rb', line 15 def { study:, project: } end |