Module: Api::Messages::FlowcellIO::Extensions

Included in:
Batch
Defined in:
app/models/api/messages/flowcell_io.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'app/models/api/messages/flowcell_io.rb', line 151

def self.included(base)
  base.class_eval do
    extend ClassMethods

    def flowcell_barcode
      requests.first.flowcell_barcode
    end

    def read_length
      requests.first..read_length
    end
    # We alias is as the json generator assumes each method is called only once.
    alias :reverse_read_length :read_length
  end
end