Class: Temper::File
Instance Attribute Summary
Attributes inherited from Base
#content_type, #original_filename
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(options = {}) ⇒ File
constructor
A new instance of File.
Methods inherited from Base
#fingerprint, #method_missing, #respond_to?
Constructor Details
#initialize(options = {}) ⇒ File
Returns a new instance of File.
3 4 5 6 7 8 9 10 11 |
# File 'lib/temper/file.rb', line 3 def initialize( = {}) ||= {} @storage = setup_storage() path = [:content] if path && ::File.exists?(path) [:original_filename] ||= ::File.basename(path) end super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Temper::Base
Instance Method Details
#close ⇒ Object
13 14 15 |
# File 'lib/temper/file.rb', line 13 def close @storage.close(true) end |