Class: Eluvia::FileWrapper
Constant Summary
ActiveModel::Attributes::COMPLEX_TYPES, ActiveModel::Attributes::SIMPLE_TYPES
Instance Method Summary
collapse
#initialize, #new_record?, #read_attribute, #write_attribute
Instance Method Details
33
34
35
|
# File 'lib/eluvia/models/file_wrapper.rb', line 33
def filename
file&.filename
end
|
15
16
17
|
# File 'lib/eluvia/models/file_wrapper.rb', line 15
def id
@id ||= (self.url ? Eluvia::Uuid.str_to_uuid("File-#{self.url}") : nil)
end
|
21
22
23
|
# File 'lib/eluvia/models/file_wrapper.rb', line 21
def type
file&.type
end
|
27
28
29
|
# File 'lib/eluvia/models/file_wrapper.rb', line 27
def url
file&.url
end
|