lib/volt/server/rack/component_html_renderer.rb in volt-0.8.14 vs lib/volt/server/rack/component_html_renderer.rb in volt-0.8.15
- old
+ new
@@ -1,21 +1,23 @@
require 'volt/page/page'
# A rack app that renders the html for a component on the backend.
-class ComponentHtmlRenderer
- def initialize
+module Volt
+ class ComponentHtmlRenderer
+ def initialize
- end
+ end
- def call(env)
- req = Rack::Request.new(env)
- path = req.path
+ def call(env)
+ req = Rack::Request.new(env)
+ path = req.path
- # For now just assume main
- component_name = 'main'
+ # For now just assume main
+ component_name = 'main'
- page = Page.new
+ page = Page.new
- component_paths = ComponentPaths.new(Volt.root)
- code = ComponentCode.new(component_name, component_paths).code
+ component_paths = ComponentPaths.new(Volt.root)
+ code = ComponentCode.new(component_name, component_paths).code
+ end
end
-end
\ No newline at end of file
+end