Class: FileInfo

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/msf/models/file_info.rb

Overview

ActiveRecord model of MSF FileInfo

Example:

FileInfo.find(1)

FileInfo.first.file_name

FileInfo.first.chromatograms.first.trace_type

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.primary_keyObject



12
13
14
# File 'lib/msf/models/file_info.rb', line 12

def self.primary_key
  :FileID
end

.table_nameObject



9
10
11
# File 'lib/msf/models/file_info.rb', line 9

def self.table_name
  :FileInfos
end

Instance Method Details

#file_basenameObject



21
22
23
24
# File 'lib/msf/models/file_info.rb', line 21

def file_basename
  path = self.FileName.gsub("\\","/")
  File.basename(path,File.extname(path))
end

#file_idObject



15
16
17
# File 'lib/msf/models/file_info.rb', line 15

def file_id
  self.FileID
end

#file_nameObject



18
19
20
# File 'lib/msf/models/file_info.rb', line 18

def file_name
  self.FileName
end

#file_sizeObject



28
29
30
# File 'lib/msf/models/file_info.rb', line 28

def file_size
  self.FileSize
end

#file_timeObject



25
26
27
# File 'lib/msf/models/file_info.rb', line 25

def file_time
  self.FileTime
end

#file_typeObject



34
35
36
# File 'lib/msf/models/file_info.rb', line 34

def file_type
  self.FileType
end

#physical_file_nameObject



31
32
33
# File 'lib/msf/models/file_info.rb', line 31

def physical_file_name
  self.PhysicalFileName
end