Class: Rstreet::Uploadable
- Inherits:
-
Object
- Object
- Rstreet::Uploadable
- Defined in:
- lib/uploadable.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(name, path) ⇒ Uploadable
constructor
A new instance of Uploadable.
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
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
5 6 7 |
# File 'lib/uploadable.rb', line 5 def hash @hash end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/uploadable.rb', line 5 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/uploadable.rb', line 5 def path @path end |