Class: Alephant::Preview::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/alephant/preview/server.rb

Instance Method Summary collapse

Instance Method Details

#render_componentObject



27
28
29
# File 'lib/alephant/preview/server.rb', line 27

def render_component
  Renderer.new(id, base_path).render(fixture_data)
end

#render_previewObject



20
21
22
23
24
25
# File 'lib/alephant/preview/server.rb', line 20

def render_preview
  ::Alephant::Views::Preview.new(
    { region => render_component },
    preview_template_location
  ).render
end