Module: Api::Messages::FlowcellIo::Extensions

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

Overview

Included in Batch model

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'app/models/api/messages/flowcell_io.rb', line 181

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_method :reverse_read_length, :read_length
  end
end