Class: Shutterbug::Handlers::FileHandlers::HtmlFile
- Inherits:
-
Base
- Object
- Base
- Shutterbug::Handlers::FileHandlers::HtmlFile
show all
- Defined in:
- lib/shutterbug/handlers/file_handlers/html_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/html_file.rb', line 6
def file_extension
"html"
end
|
#handle(helper, req, env) ⇒ Object
14
15
16
17
18
|
# File 'lib/shutterbug/handlers/file_handlers/html_file.rb', line 14
def handle(helper, req, env)
sha = regex.match(req.path)[1]
file = @config.storage.new(filename(sha),self)
helper.good_response(file.get_content, self.mime_type)
end
|
#mime_type ⇒ Object
10
11
12
|
# File 'lib/shutterbug/handlers/file_handlers/html_file.rb', line 10
def mime_type
"text/html"
end
|