Class: RhetButler::Web::PresentationApp
- Inherits:
-
Object
- Object
- RhetButler::Web::PresentationApp
- Defined in:
- lib/rhet-butler/web/presentation-app.rb
Direct Known Subclasses
Instance Method Summary collapse
- #assets_valise ⇒ Object
- #body ⇒ Object
- #call(env) ⇒ Object
- #configuration ⇒ Object
- #html_generator ⇒ Object
-
#initialize(aspect, file_manager) ⇒ PresentationApp
constructor
A new instance of PresentationApp.
- #root_step ⇒ Object
- #slides_valise ⇒ Object
- #template_cache ⇒ Object
- #template_handler ⇒ Object
Constructor Details
#initialize(aspect, file_manager) ⇒ PresentationApp
Returns a new instance of PresentationApp.
7 8 9 10 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 7 def initialize(aspect, file_manager) @file_manager = file_manager @aspect = aspect end |
Instance Method Details
#assets_valise ⇒ Object
28 29 30 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 28 def assets_valise @file_manager.base_assets(configuration.template_cache) end |
#body ⇒ Object
43 44 45 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 43 def body html_generator.render(configuration.) end |
#call(env) ⇒ Object
47 48 49 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 47 def call(env) [200, {'Content-Type' => "text/html"}, [body]] end |
#configuration ⇒ Object
12 13 14 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 12 def configuration @file_manager.aspect_config(@aspect) end |
#html_generator ⇒ Object
37 38 39 40 41 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 37 def html_generator generator = HTMLGenerator.new(configuration, template_handler) generator.root_step = root_step generator end |
#root_step ⇒ Object
32 33 34 35 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 32 def root_step = SlideLoader.new(, assets_valise, configuration) . end |
#slides_valise ⇒ Object
24 25 26 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 24 def @file_manager. end |
#template_cache ⇒ Object
16 17 18 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 16 def template_cache ::Tilt::Cache.new end |
#template_handler ⇒ Object
20 21 22 |
# File 'lib/rhet-butler/web/presentation-app.rb', line 20 def template_handler @file_manager.aspect_templates(@aspect, template_cache) end |