Class: Fluent::GCS::GZipCommandObjectCreator
- Inherits:
-
CommandObjectCreator
- Object
- ObjectCreator
- CommandObjectCreator
- Fluent::GCS::GZipCommandObjectCreator
- Defined in:
- lib/fluent/plugin/gcs/object_creator.rb
Instance Method Summary collapse
- #content_encoding ⇒ Object
- #content_type ⇒ Object
- #file_extension ⇒ Object
-
#initialize(transcoding: nil, command_parameter: nil, log: nil) ⇒ GZipCommandObjectCreator
constructor
A new instance of GZipCommandObjectCreator.
Methods inherited from CommandObjectCreator
Methods inherited from ObjectCreator
Constructor Details
#initialize(transcoding: nil, command_parameter: nil, log: nil) ⇒ GZipCommandObjectCreator
Returns a new instance of GZipCommandObjectCreator.
151 152 153 154 |
# File 'lib/fluent/plugin/gcs/object_creator.rb', line 151 def initialize(transcoding: nil, command_parameter: nil, log: nil) @transcoding = transcoding super(command_parameter: command_parameter, log: log) end |
Instance Method Details
#content_encoding ⇒ Object
160 161 162 |
# File 'lib/fluent/plugin/gcs/object_creator.rb', line 160 def content_encoding @transcoding ? "gzip" : nil end |
#content_type ⇒ Object
156 157 158 |
# File 'lib/fluent/plugin/gcs/object_creator.rb', line 156 def content_type @transcoding ? "text/plain" : "application/gzip" end |
#file_extension ⇒ Object
164 165 166 |
# File 'lib/fluent/plugin/gcs/object_creator.rb', line 164 def file_extension "gz" end |