Class: Mediaman::TemporaryDocument
Instance Attribute Summary
Attributes inherited from Document
#path
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Document
#add_metadata_to_file!, #add_to_itunes!, #artwork_path, #download_image!, #ext, #extra_path, #extra_paths, #extras_path, #extras_paths, #filename, #filename_metadata, from_path, #junk_files, #library_extras_path, #local_metadata, #local_metadata_fetched?, #primary_video_file, #rebase!, #remote_metadata, #save_and_apply_metadata!, #save_sidecar!, #secondary_video_files, #sidecar_metadata, #standalone_extras_path, #supports_embedding_video_metadata?, #video_files, #video_metadata
Class Method Details
.from_name(name) ⇒ Object
5
6
7
8
9
|
# File 'lib/mediaman/temporary_document.rb', line 5
def self.from_name(name)
f = self.new
f.path = name
f
end
|
Instance Method Details
11
12
13
14
15
16
17
18
19
|
# File 'lib/mediaman/temporary_document.rb', line 11
def metadata
@metadata ||= begin
metadata = {}
metadata.merge!(filename_metadata || {})
metadata.merge!(remote_metadata || {})
metadata.reject!{|k, v| v.blank?}
Metadata.new(metadata)
end
end
|