Class: AddSpikedInControlTask::SpikedBufferRecord

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#barcodeObject

Returns the value of attribute barcode

Returns:

  • (Object)

    the current value of barcode



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

def barcode
  @barcode
end

#indirectObject

Returns the value of attribute indirect

Returns:

  • (Object)

    the current value of indirect



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

def indirect
  @indirect
end

#requestObject

Returns the value of attribute request

Returns:

  • (Object)

    the current value of request



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

def request
  @request
end

Instance Method Details

#labelObject



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_pathObject



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