Class: Rstreet::Uploadable

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path) ⇒ Uploadable

Returns a new instance of Uploadable.



7
8
9
10
11
# File 'lib/uploadable.rb', line 7

def initialize(name, path)
  @name, @path = name, path
  @hash = gen_hash || ""
  @content_type = gen_content_type || "application/octet-stream"
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



5
6
7
# File 'lib/uploadable.rb', line 5

def hash
  @hash
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/uploadable.rb', line 5

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/uploadable.rb', line 5

def path
  @path
end