lib/jsduck/index_html.rb in jsduck-3.4.1 vs lib/jsduck/index_html.rb in jsduck-3.5.0

- old
+ new

@@ -3,15 +3,12 @@ module JsDuck # Deals with creation of main HTML or PHP files. class IndexHtml - attr_accessor :welcome - attr_accessor :categories - attr_accessor :guides - - def initialize(opts) + def initialize(assets, opts) + @assets = assets @opts = opts end # In normal mode creates index.html. # @@ -32,12 +29,12 @@ write_template(in_file, out_file, { "{title}" => @opts.title, "{header}" => @opts.header, "{footer}" => "<div id='footer-content' style='display: none'>#{@opts.footer}</div>", "{extjs_path}" => @opts.extjs_path, - "{welcome}" => @welcome.to_html, - "{categories}" => @categories.to_html, - "{guides}" => @guides.to_html, + "{welcome}" => @assets.welcome.to_html, + "{categories}" => @assets.categories.to_html, + "{guides}" => @assets.guides.to_html, "{head_html}" => @opts.head_html, "{body_html}" => @opts.body_html, }) end