class Dynosaur::Process

Attributes

rake_command[R]

Public Class Methods

new(task:, args: [], opts: {}) click to toggle source
# File lib/dynosaur/process.rb, line 5
def initialize(task:, args: [], opts: {})
  @rake_command = Utils::RakeCommand.new(task: task, args: args)
  after_initialize(opts)
end

Public Instance Methods

running?() click to toggle source
# File lib/dynosaur/process.rb, line 10
def running?
  klass = self.class::Finder
  finder = klass.new(rake_command: rake_command)
  finder.exists?
end
start() click to toggle source
# File lib/dynosaur/process.rb, line 16
def start
  fail NotImplementedError, 'This method must be implemented in a subclass'
end

Private Instance Methods

after_initialize(opts) click to toggle source
# File lib/dynosaur/process.rb, line 24
def after_initialize(opts)
  # Do nothing so subclasses don't have to override if they want a no-op
end