Module: Lono::Blueprint::Root
- Included in:
- AbstractBase
- Defined in:
- lib/lono/blueprint/root.rb
Instance Method Summary collapse
- #find_blueprint_root(blueprint) ⇒ Object
-
#set_blueprint_root(blueprint) ⇒ Object
Switch the lono root.
Instance Method Details
#find_blueprint_root(blueprint) ⇒ Object
20 21 22 23 |
# File 'lib/lono/blueprint/root.rb', line 20 def find_blueprint_root(blueprint) config = Lono::Finder::Blueprint.find(blueprint) # blueprint_root config.root if config end |
#set_blueprint_root(blueprint) ⇒ Object
Switch the lono root
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lono/blueprint/root.rb', line 6 def set_blueprint_root(blueprint) blueprint_root = find_blueprint_root(blueprint) if blueprint_root Lono.blueprint_root = blueprint_root else puts " ERROR: Unable to find the blueprint \#{blueprint.inspect}.\n Are you sure its in your Gemfile or in the blueprints folder with the correct name?\n EOL\n Lono::Finder::Blueprint.list\n ENV['LONO_TEST'] ? raise(\"Unable to find blueprint: \#{blueprint.inspect}\") : exit(1)\n end\nend\n".color(:red) |