Class: Egg::CLI
- Inherits:
-
Thor
- Object
- Thor
- Egg::CLI
- Defined in:
- lib/egg/cli.rb
Overview
Defines the CLI interface to egg functions
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/egg/cli.rb', line 11 def init config = Templates["egg_config.rb"] if File.exist?("egg_config.rb") && ![:force] print "egg has already been initialized! (maybe you want to --force)\n" exit(1) else File.write("egg_config.rb", config.result) print "Wrote example egg_config.rb, customize it to suit your app" write_git_ignorance end end |
#readme ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/egg/cli.rb', line 24 def readme # Print out the readme readme_path = File.("../../../doc/README.md", __FILE__) File.open(readme_path, "r") do |f| print(f.read) end end |
#setup ⇒ Object
33 34 35 36 |
# File 'lib/egg/cli.rb', line 33 def setup config = Configuration.load "./egg_config.rb" config.run_setup end |