Class: Bulldog::SavedFile
- Inherits:
-
Object
- Object
- Bulldog::SavedFile
- Defined in:
- lib/bulldog/saved_file.rb
Instance Attribute Summary collapse
-
#file_name ⇒ Object
readonly
The original file name as it was uploaded, if any.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ SavedFile
constructor
A new instance of SavedFile.
- #size ⇒ Object
Constructor Details
#initialize(path, options = {}) ⇒ SavedFile
Returns a new instance of SavedFile.
3 4 5 6 |
# File 'lib/bulldog/saved_file.rb', line 3 def initialize(path, ={}) @path = path @file_name = [:file_name] end |
Instance Attribute Details
#file_name ⇒ Object (readonly)
The original file name as it was uploaded, if any.
13 14 15 |
# File 'lib/bulldog/saved_file.rb', line 13 def file_name @file_name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/bulldog/saved_file.rb', line 8 def path @path end |
Instance Method Details
#size ⇒ Object
15 16 17 |
# File 'lib/bulldog/saved_file.rb', line 15 def size File.size(path) end |