lib/jsduck/app_data.rb in jsduck-3.4.1 vs lib/jsduck/app_data.rb in jsduck-3.5.0
- old
+ new
@@ -6,26 +6,23 @@
module JsDuck
# Creates big JS file with data for Docs app.
class AppData
- attr_accessor :guides
- attr_accessor :videos
- attr_accessor :examples
-
- def initialize(relations, opts)
+ def initialize(relations, assets, opts)
@relations = relations
+ @assets = assets
@opts = opts
end
# Writes classes, guides, videos, and search data to one big .js file
def write(filename)
js = "Docs = " + JsonDuck.generate({
:data => {
:classes => Icons.new.create(@relations.classes),
- :guides => @guides.to_array,
- :videos => @videos.to_array,
- :examples => @examples.to_array,
+ :guides => @assets.guides.to_array,
+ :videos => @assets.videos.to_array,
+ :examples => @assets.examples.to_array,
:search => SearchData.new.create(@relations.classes),
:stats => @opts.stats ? Stats.new.create(@relations.classes) : [],
:signatures => signatures,
:localStorageDb => @opts.local_storage_db,
:showPrintButton => @opts.seo,