Class: FluidigmFile::Finder::Directory
- Inherits:
-
Object
- Object
- FluidigmFile::Finder::Directory
- Defined in:
- app/models/fluidigm_file.rb
Instance Method Summary collapse
- #content ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(barcode) ⇒ Directory
constructor
A new instance of Directory.
Constructor Details
#initialize(barcode) ⇒ Directory
Returns a new instance of Directory.
5 6 7 |
# File 'app/models/fluidigm_file.rb', line 5 def initialize() @barcode = end |
Instance Method Details
#content ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/models/fluidigm_file.rb', line 13 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
9 10 11 |
# File 'app/models/fluidigm_file.rb', line 9 def empty? !File.exist?("#{configatron.fluidigm_data.directory}/#{@barcode}/#{@barcode}.csv") end |