Class: Jets::Event::Helpers::S3Event::NamedFile
- Extended by:
- Memoist
- Defined in:
- lib/jets/event/helpers/s3_event.rb
Overview
The Ruby File handle does not store information about the filename. NamedFile includes the filename which is useful for downstream processing.
Instance Attribute Summary collapse
-
#filename ⇒ Object
(also: #object_key)
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(file_handle, filename) ⇒ NamedFile
constructor
A new instance of NamedFile.
Constructor Details
#initialize(file_handle, filename) ⇒ NamedFile
Returns a new instance of NamedFile.
65 66 67 68 |
# File 'lib/jets/event/helpers/s3_event.rb', line 65 def initialize(file_handle, filename) @filename = filename super(file_handle, "r") end |
Instance Attribute Details
#filename ⇒ Object (readonly) Also known as: object_key
Returns the value of attribute filename.
61 62 63 |
# File 'lib/jets/event/helpers/s3_event.rb', line 61 def filename @filename end |
Instance Method Details
#content ⇒ Object
70 71 72 |
# File 'lib/jets/event/helpers/s3_event.rb', line 70 def content read end |