Class: ComponentHtmlRenderer
- Defined in:
- lib/volt/server/rack/component_html_renderer.rb
Overview
A rack app that renders the html for a component on the backend.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize ⇒ ComponentHtmlRenderer
constructor
A new instance of ComponentHtmlRenderer.
Constructor Details
#initialize ⇒ ComponentHtmlRenderer
Returns a new instance of ComponentHtmlRenderer.
5 6 7 |
# File 'lib/volt/server/rack/component_html_renderer.rb', line 5 def initialize end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/volt/server/rack/component_html_renderer.rb', line 9 def call(env) req = Rack::Request.new(env) path = req.path # For now just assume home component_name = 'home' page = Page.new component_paths = ComponentPaths.new(Volt.root) code = ComponentCode.new(component_name, component_paths).code end |