Class: Lono::Template::Generator
- Inherits:
-
AbstractBase
- Object
- AbstractBase
- Lono::Template::Generator
- Defined in:
- lib/lono/template/generator.rb
Instance Method Summary collapse
Methods inherited from AbstractBase
#initialize, #reinitialize, #template_path
Methods included from Blueprint::Root
#find_blueprint_root, #set_blueprint_root
Constructor Details
This class inherits a constructor from Lono::AbstractBase
Instance Method Details
#lono_strategy ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/lono/template/generator.rb', line 14 def lono_strategy if [:source] "source" else jadespec = Lono::Jadespec.new(Lono.blueprint_root, "unknown") # abusing Jadespec to get lono_strategy jadespec.lono_strategy end end |
#run ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/lono/template/generator.rb', line 5 def run # Examples: # Erb.new(options).run # Dsl.new(options).run generator_class = "Lono::Template::Strategy::#{lono_strategy.camelize}" generator_class = Object.const_get(generator_class) generator_class.new().run # The generator strategy classes write templates to disk end |