Class: Submission::OrderPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/models/submission/order_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ OrderPresenter

Returns a new instance of OrderPresenter.



10
11
12
# File 'app/models/submission/order_presenter.rb', line 10

def initialize(order)
  @target_order = order
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



20
21
22
# File 'app/models/submission/order_presenter.rb', line 20

def method_missing(method, ...)
  @target_order.send(method, ...)
end

Instance Attribute Details

#commentsObject

Returns the value of attribute comments.



3
4
5
# File 'app/models/submission/order_presenter.rb', line 3

def comments
  @comments
end

#lanes_of_sequencing_requiredObject

Returns the value of attribute lanes_of_sequencing_required.



3
4
5
# File 'app/models/submission/order_presenter.rb', line 3

def lanes_of_sequencing_required
  @lanes_of_sequencing_required
end

#plate_purpose_idObject

Returns the value of attribute plate_purpose_id.



3
4
5
# File 'app/models/submission/order_presenter.rb', line 3

def plate_purpose_id
  @plate_purpose_id
end

#project_nameObject

Returns the value of attribute project_name.



3
4
5
# File 'app/models/submission/order_presenter.rb', line 3

def project_name
  @project_name
end

#sample_names_textObject

Returns the value of attribute sample_names_text.



3
4
5
# File 'app/models/submission/order_presenter.rb', line 3

def sample_names_text
  @sample_names_text
end

#study_idObject

Returns the value of attribute study_id.



3
4
5
# File 'app/models/submission/order_presenter.rb', line 3

def study_id
  @study_id
end

Instance Method Details

#idObject

id needs to be defined to stop Object#id being called on the OrderPresenter instance.



16
17
18
# File 'app/models/submission/order_presenter.rb', line 16

def id
  @target_order.id
end