Class: Recap::Support::CLI
- Inherits:
-
Thor
- Object
- Thor
- Recap::Support::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/recap/support/cli.rb
Overview
Recap provides a simple command-line tool (‘recap`) to generate a `Capfile` in your project.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#recipe ⇒ Object
Returns the value of attribute recipe.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#server ⇒ Object
Returns the value of attribute server.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/recap/support/cli.rb', line 13 def name @name end |
#recipe ⇒ Object
Returns the value of attribute recipe.
13 14 15 |
# File 'lib/recap/support/cli.rb', line 13 def recipe @recipe end |
#repository ⇒ Object
Returns the value of attribute repository.
13 14 15 |
# File 'lib/recap/support/cli.rb', line 13 def repository @repository end |
#server ⇒ Object
Returns the value of attribute server.
13 14 15 |
# File 'lib/recap/support/cli.rb', line 13 def server @server end |
Class Method Details
.source_root ⇒ Object
15 16 17 |
# File 'lib/recap/support/cli.rb', line 15 def self.source_root File.("../templates", __FILE__) end |
Instance Method Details
#setup ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/recap/support/cli.rb', line 25 def setup self.name = ["name"] || guess_name self.repository = ["repo"] || guess_repository self.recipe = ["recipe"] || guess_recipe self.server = ["server"] || 'your-server-address' template 'Capfile.erb', 'Capfile' end |