Class: Recipes::Api
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- Recipes::Api
- Defined in:
- lib/potassium/recipes/api.rb
Instance Method Summary collapse
Instance Method Details
#ask ⇒ Object
2 3 4 5 |
# File 'lib/potassium/recipes/api.rb', line 2 def ask api_support = answer(:api) { Ask.confirm("Do you want to enable API support?") } set :api, api_support end |
#create ⇒ Object
7 8 9 |
# File 'lib/potassium/recipes/api.rb', line 7 def create add_power_api if get(:api) end |
#install ⇒ Object
11 12 13 14 |
# File 'lib/potassium/recipes/api.rb', line 11 def install ask create end |
#installed? ⇒ Boolean
16 17 18 |
# File 'lib/potassium/recipes/api.rb', line 16 def installed? gem_exists?(/power_api/) end |