Class: Fiona7::BinaryHandling::MetaBinary::TransformedBinary

Inherits:
UnmodifiedBinary show all
Defined in:
lib/fiona7/scrivito_patches/binary.rb

Instance Method Summary collapse

Methods inherited from UnmodifiedBinary

#image?, #length, #mime_type, #present?

Methods inherited from ActualBinary

#initialize

Constructor Details

This class inherits a constructor from Fiona7::BinaryHandling::MetaBinary::ActualBinary

Instance Method Details

#filenameObject



128
129
130
# File 'lib/fiona7/scrivito_patches/binary.rb', line 128

def filename
  ::File.basename(self.transformed_filepath)
end

#filepathObject



133
134
135
# File 'lib/fiona7/scrivito_patches/binary.rb', line 133

def filepath
  self.transformed_filepath
end

#last_changedObject



141
142
143
# File 'lib/fiona7/scrivito_patches/binary.rb', line 141

def last_changed
  ::File.mtime(self.transformed_filepath).utc
end

#legnthObject



137
138
139
# File 'lib/fiona7/scrivito_patches/binary.rb', line 137

def legnth
  ::File.size(self.transformed_filepath)
end

#original_filepathObject



132
# File 'lib/fiona7/scrivito_patches/binary.rb', line 132

alias_method :original_filepath, :filepath

#valid?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/fiona7/scrivito_patches/binary.rb', line 124

def valid?
  super && valid_transformation?
end