Class: FluidigmFile::Finder::Directory

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

Instance Method Summary collapse

Constructor Details

#initialize(barcode) ⇒ Directory


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

def initialize(barcode)
  @barcode = barcode
end

Instance Method Details

#contentObject


12
13
14
15
16
17
18
# File 'app/models/fluidigm_file.rb', line 12

def content
  file_content = nil
  File.open("#{configatron.fluidigm_data.directory}/#{@barcode}/#{@barcode}.csv") do |file|
    file_content = file.read
  end
  file_content
end

#empty?Boolean


8
9
10
# File 'app/models/fluidigm_file.rb', line 8

def empty?
  !File.exist?("#{configatron.fluidigm_data.directory}/#{@barcode}/#{@barcode}.csv")
end