Class: FluidigmFile::Finder::Irods

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

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Constructor Details

#initialize(barcode) ⇒ Irods

Returns a new instance of Irods.


23
24
25
26
# File 'app/models/fluidigm_file.rb', line 23

def initialize(barcode)
  @data =
    IrodsReader::DataObj.find('seq', 'dcterms:audience' => configatron.irods_audience, :fluidigm_plate => barcode)
end

Instance Method Details

#content(index = nil) ⇒ Object

Raises:

  • (StandardError)

32
33
34
35
36
# File 'app/models/fluidigm_file.rb', line 32

def content(index = nil)
  raise StandardError, 'Multiple files found' if data.size > 1 && index.nil?

  @data[index || 0].retrive
end

#empty?Boolean

Returns:

  • (Boolean)

28
29
30
# File 'app/models/fluidigm_file.rb', line 28

def empty?
  @data.empty?
end