Class: Lono::Extensions::Preparer

Inherits:
AbstractBase show all
Defined in:
lib/lono/extensions/preparer.rb

Instance Method Summary collapse

Methods inherited from AbstractBase

#reinitialize, #template_path

Methods included from Blueprint::Root

#find_blueprint_root, #set_blueprint_root

Constructor Details

#initialize(options = {}) ⇒ Preparer

Returns a new instance of Preparer.



3
4
5
6
# File 'lib/lono/extensions/preparer.rb', line 3

def initialize(options={})
  super
  @register = Register.new(options)
end

Instance Method Details

#downloadObject



14
15
16
17
18
19
# File 'lib/lono/extensions/preparer.rb', line 14

def download
  Lono::Jade::Registry.tracked_extensions.each do |registry|
    jade = Lono::Jade.new(registry.name, "extension", registry)
    jade.materialize # adds to Lono::Jade::Registry.downloaded_extensions
  end
end

#final_materializeObject



21
22
23
24
# File 'lib/lono/extensions/preparer.rb', line 21

def final_materialize
  jades = Lono::Jade::Registry.downloaded_extensions
  Lono::Jade::Materializer::Final.new.build(jades)
end

#runObject



8
9
10
11
12
# File 'lib/lono/extensions/preparer.rb', line 8

def run
  @register.run
  download
  final_materialize
end