Class: Refile::FileDouble
- Inherits:
-
Object
- Object
- Refile::FileDouble
- Extended by:
- Forwardable
- Defined in:
- lib/refile/file_double.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#original_filename ⇒ Object
readonly
Returns the value of attribute original_filename.
Instance Method Summary collapse
-
#initialize(data, name = nil, content_type: nil) ⇒ FileDouble
constructor
A new instance of FileDouble.
Constructor Details
#initialize(data, name = nil, content_type: nil) ⇒ FileDouble
Returns a new instance of FileDouble.
4 5 6 7 8 |
# File 'lib/refile/file_double.rb', line 4 def initialize(data, name = nil, content_type: nil) @io = StringIO.new(data) @original_filename = name @content_type = content_type end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
3 4 5 |
# File 'lib/refile/file_double.rb', line 3 def content_type @content_type end |
#original_filename ⇒ Object (readonly)
Returns the value of attribute original_filename.
3 4 5 |
# File 'lib/refile/file_double.rb', line 3 def original_filename @original_filename end |