Class: RenderStatic::Renderer
- Inherits:
-
Object
- Object
- RenderStatic::Renderer
- Defined in:
- lib/render_static/renderer.rb
Class Method Summary collapse
Class Method Details
.render(env) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/render_static/renderer.rb', line 7 def self.render(env) Headless.ly do browser = Selenium::WebDriver.for(:firefox) path = "#{env["rack.url_scheme"]}://#{env["HTTP_HOST"]}#{env["REQUEST_PATH"]}" browser.navigate.to(path) [200, { "Content-Type" => "text/html" }, [browser.page_source]] # TODO status code not supported by selenium end end |