Method: Transcriptic::Labfile.from_file

Defined in:
lib/transcriptic/labfile.rb

.from_file(file) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/transcriptic/labfile.rb', line 8

def from_file(file)
  content = File.read(file)
  object = new(file)
  object.load(content)
rescue Errno::ENOENT => e
  raise FileNotFound, "No Labfile found at: #{file}"
end