Class: FileInfo
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- FileInfo
- 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
- #file_basename ⇒ Object
- #file_id ⇒ Object
- #file_name ⇒ Object
- #file_size ⇒ Object
- #file_time ⇒ Object
- #file_type ⇒ Object
- #physical_file_name ⇒ Object
Class Method Details
.primary_key ⇒ Object
12 13 14 |
# File 'lib/msf/models/file_info.rb', line 12 def self.primary_key :FileID end |
.table_name ⇒ Object
9 10 11 |
# File 'lib/msf/models/file_info.rb', line 9 def self.table_name :FileInfos end |
Instance Method Details
#file_basename ⇒ Object
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_id ⇒ Object
15 16 17 |
# File 'lib/msf/models/file_info.rb', line 15 def file_id self.FileID end |
#file_name ⇒ Object
18 19 20 |
# File 'lib/msf/models/file_info.rb', line 18 def file_name self.FileName end |
#file_size ⇒ Object
28 29 30 |
# File 'lib/msf/models/file_info.rb', line 28 def file_size self.FileSize end |
#file_time ⇒ Object
25 26 27 |
# File 'lib/msf/models/file_info.rb', line 25 def file_time self.FileTime end |
#file_type ⇒ Object
34 35 36 |
# File 'lib/msf/models/file_info.rb', line 34 def file_type self.FileType end |
#physical_file_name ⇒ Object
31 32 33 |
# File 'lib/msf/models/file_info.rb', line 31 def physical_file_name self.PhysicalFileName end |