Class: RhetButler::HTMLGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/rhet-butler/html-generator.rb

Defined Under Namespace

Classes: Presentation, RenderFacade

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration, templates) ⇒ HTMLGenerator

Returns a new instance of HTMLGenerator.



36
37
38
39
40
41
# File 'lib/rhet-butler/html-generator.rb', line 36

def initialize(configuration, templates)
  @impress_config = configuration.impress_config
  @templates = templates
  @root_step
  @presentation = Presentation.new(configuration)
end

Instance Attribute Details

#impress_configObject

Returns the value of attribute impress_config.



43
44
45
# File 'lib/rhet-butler/html-generator.rb', line 43

def impress_config
  @impress_config
end

#presentationObject

Returns the value of attribute presentation.



43
44
45
# File 'lib/rhet-butler/html-generator.rb', line 43

def presentation
  @presentation
end

#root_stepObject

Returns the value of attribute root_step.



43
44
45
# File 'lib/rhet-butler/html-generator.rb', line 43

def root_step
  @root_step
end

Instance Method Details

#render(template, item = nil) ⇒ Object



45
46
47
# File 'lib/rhet-butler/html-generator.rb', line 45

def render(template, item=nil)
  RenderFacade.new(@templates, item || self).render(template)
end