Class: Dynosaur::Process::Heroku::Finder

Inherits:
Object
  • Object
show all
Defined in:
lib/dynosaur/process/heroku/finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(rake_command:, client: Client::HerokuClient.client) ⇒ Finder

Returns a new instance of Finder.



6
7
8
9
# File 'lib/dynosaur/process/heroku/finder.rb', line 6

def initialize(rake_command:, client: Client::HerokuClient.client)
  @rake_command = rake_command
  @client = client
end

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
# File 'lib/dynosaur/process/heroku/finder.rb', line 11

def exists?
  one_off_dynos.any? do |dyno|
    Utils::RakeCommand.valid?(dyno.command) &&
      Utils::RakeCommand.parse(dyno.command) == rake_command
  end
end