Class: Lono::Extensions::Preparer
- Inherits:
-
AbstractBase
- Object
- AbstractBase
- Lono::Extensions::Preparer
- Defined in:
- lib/lono/extensions/preparer.rb
Instance Method Summary collapse
- #download ⇒ Object
- #final_materialize ⇒ Object
-
#initialize(options = {}) ⇒ Preparer
constructor
A new instance of Preparer.
- #run ⇒ Object
Methods inherited from AbstractBase
Methods included from Blueprint::Root
#find_blueprint_root, #set_blueprint_root
Constructor Details
permalink #initialize(options = {}) ⇒ Preparer
Returns a new instance of Preparer.
3 4 5 6 |
# File 'lib/lono/extensions/preparer.rb', line 3 def initialize(={}) super @register = Register.new() end |
Instance Method Details
permalink #download ⇒ Object
[View source]
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 |
permalink #final_materialize ⇒ Object
[View source]
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 |
permalink #run ⇒ Object
[View source]
8 9 10 11 12 |
# File 'lib/lono/extensions/preparer.rb', line 8 def run @register.run download final_materialize end |