Class: AddSpikedInControlTask::SpikedBufferRecord
- Inherits:
-
Struct
- Object
- Struct
- AddSpikedInControlTask::SpikedBufferRecord
- Defined in:
- app/models/add_spiked_in_control_task.rb
Overview
Holds information about a PhiX buffer for a given request in order to render the view. - If indirect, will inform the user that PhiX has already been added, but will let them override this with a deliberate click. - To partial path is used by rails if you do render object
, this lets us keep the logic outside of the views.
Instance Attribute Summary collapse
-
#barcode ⇒ Object
Returns the value of attribute barcode.
-
#indirect ⇒ Object
Returns the value of attribute indirect.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
Instance Attribute Details
#barcode ⇒ Object
Returns the value of attribute barcode
13 14 15 |
# File 'app/models/add_spiked_in_control_task.rb', line 13 def @barcode end |
#indirect ⇒ Object
Returns the value of attribute indirect
13 14 15 |
# File 'app/models/add_spiked_in_control_task.rb', line 13 def indirect @indirect end |
#request ⇒ Object
Returns the value of attribute request
13 14 15 |
# File 'app/models/add_spiked_in_control_task.rb', line 13 def request @request end |
Instance Method Details
#label ⇒ Object
19 20 21 |
# File 'app/models/add_spiked_in_control_task.rb', line 19 def label request ? "Request #{request.position} : #{request.asset.display_name} PhiX Barcode" : 'PhiX Barcode' end |
#to_partial_path ⇒ Object
15 16 17 |
# File 'app/models/add_spiked_in_control_task.rb', line 15 def to_partial_path indirect ? 'indirect_phi_x_fields' : 'direct_phi_x_fields' end |