Class: Frizz::Local::File

Inherits:
Object
  • Object
show all
Defined in:
lib/frizz/local.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, key, options = {}) ⇒ File

Returns a new instance of File.



60
61
62
63
64
# File 'lib/frizz/local.rb', line 60

def initialize(path, key, options = {})
  @path = path
  @key = key
  @options = options
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



58
59
60
# File 'lib/frizz/local.rb', line 58

def key
  @key
end

#pathObject (readonly)

Returns the value of attribute path.



58
59
60
# File 'lib/frizz/local.rb', line 58

def path
  @path
end

Instance Method Details

#checksumObject



66
67
68
69
# File 'lib/frizz/local.rb', line 66

def checksum
  return nil if options[:redirect_to]
  Digest::MD5.file(path)
end

#upload_optionsObject



71
72
73
# File 'lib/frizz/local.rb', line 71

def upload_options
  options
end