Class: 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


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

def initialize(order)
  @target_order = order
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object


14
15
16
# File 'app/models/submission/order_presenter.rb', line 14

def method_missing(method, *args, &block)
  @target_order.send(method, *args, &block)
end

Instance Attribute Details

#commentsObject

Returns the value of attribute comments


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

def comments
  @comments
end

#lanes_of_sequencing_requiredObject

Returns the value of attribute lanes_of_sequencing_required


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

def lanes_of_sequencing_required
  @lanes_of_sequencing_required
end

#plate_purpose_idObject

Returns the value of attribute plate_purpose_id


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

def plate_purpose_id
  @plate_purpose_id
end

#project_nameObject

Returns the value of attribute project_name


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

def project_name
  @project_name
end

#sample_names_textObject

Returns the value of attribute sample_names_text


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

def sample_names_text
  @sample_names_text
end

#study_idObject

Returns the value of attribute study_id


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

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.


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

def id
  @target_order.id
end