Class: SC::Builder::TestIndex
- Defined in:
- lib/sproutcore/builders/test_index.rb
Overview
Builds an HTML files. This will setup an HtmlContext and then invokes the render engines for each source before finally rendering the layout.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
build, #initialize, #joinlines, #readlines, #replace_static_url, #static_url, #writelines
Constructor Details
This class inherits a constructor from SC::Builder::Base
Instance Method Details
#build(dst_path) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/sproutcore/builders/test_index.rb', line 16 def build(dst_path) require 'json' items = entry.source_entries.map do |e| { "filename" => e.filename.ext(''), "url" => e.url } end writelines dst_path, [items.to_json] end |