Class: Shutterbug::Handlers::FileHandlers::PngFile
- Inherits:
-
Base
- Object
- Base
- Shutterbug::Handlers::FileHandlers::PngFile
show all
- Defined in:
- lib/shutterbug/handlers/file_handlers/png_file.rb
Instance Attribute Summary
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods inherited from Base
#filename, #filename_matcher, #initialize, instance, #path_prefix, #regex, #urlify
Instance Method Details
#file_extension ⇒ Object
6
7
8
|
# File 'lib/shutterbug/handlers/file_handlers/png_file.rb', line 6
def file_extension
"png"
end
|
#handle(helper, req, env) ⇒ Object
14
15
16
17
18
|
# File 'lib/shutterbug/handlers/file_handlers/png_file.rb', line 14
def handle(helper, req, env)
local_filename = regex.match(req.path)[1]
file = @config.storage.new(local_filename,self)
helper.good_response(file.get_content, self.mime_type)
end
|
#mime_type ⇒ Object
10
11
12
|
# File 'lib/shutterbug/handlers/file_handlers/png_file.rb', line 10
def mime_type
"image/png"
end
|