Class: Neetob::CLI::Heroku::Stack
- Defined in:
- lib/neetob/cli/heroku/stack.rb
Constant Summary
Constants inherited from Base
Constants inherited from Base
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(app) ⇒ Stack
constructor
A new instance of Stack.
- #run ⇒ Object
Methods inherited from Base
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(app) ⇒ Stack
Returns a new instance of Stack.
11 12 13 14 |
# File 'lib/neetob/cli/heroku/stack.rb', line 11 def initialize(app) super() @app = app end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
9 10 11 |
# File 'lib/neetob/cli/heroku/stack.rb', line 9 def app @app end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/neetob/cli/heroku/stack.rb', line 16 def run raise(StandardError, "HEROKU_API_KEY is not given") if ENV["HEROKU_API_KEY"].nil? url = create_url(app) response = get(url) ui.success(response[:build_stack][:name]) end |