Class: FBO::SegmentedFile
- Extended by:
- Forwardable
- Defined in:
- lib/fbo/segmented_file.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #contents ⇒ Object
- #contents_for_type(type) ⇒ Object
-
#initialize(file) ⇒ SegmentedFile
constructor
A new instance of SegmentedFile.
Methods inherited from File
Constructor Details
#initialize(file) ⇒ SegmentedFile
Returns a new instance of SegmentedFile.
11 12 13 |
# File 'lib/fbo/segmented_file.rb', line 11 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/fbo/segmented_file.rb', line 7 def file @file end |
Instance Method Details
#contents ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fbo/segmented_file.rb', line 35 def contents @contents ||= [ presol_contents, combine_contents, amdcss_contents, mod_contents, award_contents, ja_contents, itb_contents, fairopp_contents, srcsgt_contents, fstd_contents, snote_contents, ssale_contents, epsupload_contents, delete_contents, archive_contents, unarchive_contents ].compact end |
#contents_for_type(type) ⇒ Object
55 56 57 58 59 |
# File 'lib/fbo/segmented_file.rb', line 55 def contents_for_type(type) return unless type method_name = "#{ type }_contents" self.respond_to?(method_name) ? self.send(method_name) : nil end |