Class: Aptible::CLI::Helpers::App::GitRemoteHandleStrategy
- Inherits:
-
Object
- Object
- Aptible::CLI::Helpers::App::GitRemoteHandleStrategy
- Defined in:
- lib/aptible/cli/helpers/app.rb
Instance Method Summary collapse
- #app_handle ⇒ Object
- #env_handle ⇒ Object
- #explain ⇒ Object
-
#initialize(options) ⇒ GitRemoteHandleStrategy
constructor
A new instance of GitRemoteHandleStrategy.
- #usable? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ GitRemoteHandleStrategy
Returns a new instance of GitRemoteHandleStrategy.
57 58 59 60 61 |
# File 'lib/aptible/cli/helpers/app.rb', line 57 def initialize() @remote_name = [:remote] || ENV['APTIBLE_REMOTE'] || 'aptible' @repo_dir = Dir.pwd end |
Instance Method Details
#app_handle ⇒ Object
63 64 65 |
# File 'lib/aptible/cli/helpers/app.rb', line 63 def app_handle handles_from_remote[:app_handle] end |
#env_handle ⇒ Object
67 68 69 |
# File 'lib/aptible/cli/helpers/app.rb', line 67 def env_handle handles_from_remote[:environment_handle] end |
#explain ⇒ Object
75 76 77 |
# File 'lib/aptible/cli/helpers/app.rb', line 75 def explain "(options derived from git remote #{@remote_name})" end |
#usable? ⇒ Boolean
71 72 73 |
# File 'lib/aptible/cli/helpers/app.rb', line 71 def usable? !app_handle.nil? && !env_handle.nil? end |