Class: RubyAPI::UploadedFile
- Inherits:
-
Object
- Object
- RubyAPI::UploadedFile
- Defined in:
- lib/fastrb/context.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#tempfile ⇒ Object
readonly
Returns the value of attribute tempfile.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(filename:, type:, tempfile:) ⇒ UploadedFile
constructor
A new instance of UploadedFile.
- #read ⇒ Object
- #rewind ⇒ Object
Constructor Details
#initialize(filename:, type:, tempfile:) ⇒ UploadedFile
Returns a new instance of UploadedFile.
167 168 169 170 171 |
# File 'lib/fastrb/context.rb', line 167 def initialize(filename:, type:, tempfile:) @filename = filename @type = type @tempfile = tempfile end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
165 166 167 |
# File 'lib/fastrb/context.rb', line 165 def filename @filename end |
#tempfile ⇒ Object (readonly)
Returns the value of attribute tempfile.
165 166 167 |
# File 'lib/fastrb/context.rb', line 165 def tempfile @tempfile end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
165 166 167 |
# File 'lib/fastrb/context.rb', line 165 def type @type end |
Instance Method Details
#read ⇒ Object
173 174 175 |
# File 'lib/fastrb/context.rb', line 173 def read @tempfile.read end |
#rewind ⇒ Object
177 178 179 |
# File 'lib/fastrb/context.rb', line 177 def rewind @tempfile.rewind end |