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



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

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

#render_previewObject



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

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