Module: Ddr::HasIntermediateFile

Extended by:
ActiveSupport::Concern
Included in:
Component
Defined in:
app/models/concerns/ddr/has_intermediate_file.rb

Instance Method Summary collapse

Instance Method Details

#intermediate_extensionObject

This method is used in dul-hydra ‘ComponentsController’



14
15
16
17
18
# File 'app/models/concerns/ddr/has_intermediate_file.rb', line 14

def intermediate_extension
  if filename = intermediate_file&.original_filename
    ::File.extname(filename)
  end
end

#intermediate_pathObject



20
21
22
# File 'app/models/concerns/ddr/has_intermediate_file.rb', line 20

def intermediate_path
  intermediate_file&.file&.disk_path
end

#intermediate_typeObject



9
10
11
# File 'app/models/concerns/ddr/has_intermediate_file.rb', line 9

def intermediate_type
  intermediate_file&.media_type
end