Class: Volt::ComponentHtmlRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/volt/server/rack/component_html_renderer.rb

Instance Method Summary collapse

Constructor Details

#initializeComponentHtmlRenderer

Returns a new instance of ComponentHtmlRenderer.



6
7
# File 'lib/volt/server/rack/component_html_renderer.rb', line 6

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 main
  component_name = 'main'

  page = Page.new

  component_paths = ComponentPaths.new(Volt.root)
  code            = ComponentCode.new(component_name, component_paths).code
end