Class: Textus::Builder
- Inherits:
-
Object
- Object
- Textus::Builder
- Defined in:
- lib/textus/builder.rb
Instance Method Summary collapse
- #build(prefix: nil) ⇒ Object
-
#initialize(store) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(store) ⇒ Builder
Returns a new instance of Builder.
8 9 10 11 12 |
# File 'lib/textus/builder.rb', line 8 def initialize(store) @store = store @manifest = store.manifest @root = store.root end |
Instance Method Details
#build(prefix: nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/textus/builder.rb', line 14 def build(prefix: nil) built = [] @manifest.entries.each do |mentry| next unless derived_zone?(mentry) next unless mentry.projection || mentry.template next if prefix && !mentry.key.start_with?(prefix) result = materialize(mentry) built << result end published_leaves = publish_leaves(prefix: prefix) { "protocol" => Textus::PROTOCOL, "built" => built, "published_leaves" => published_leaves } end |