Class: Crabfarm::CrabtrapContext

Inherits:
Context
  • Object
show all
Defined in:
lib/crabfarm/crabtrap_context.rb

Instance Method Summary collapse

Methods inherited from Context

#initialize, #reset, #run_state

Constructor Details

This class inherits a constructor from Crabfarm::Context

Instance Method Details

#capture(_path) ⇒ Object



16
17
18
# File 'lib/crabfarm/crabtrap_context.rb', line 16

def capture(_path)
  restart_with_options(mode: :capture, bucket_path: _path)
end

#loadObject



7
8
9
10
# File 'lib/crabfarm/crabtrap_context.rb', line 7

def load
  pass_through if @runner.nil?
  super
end

#pass_throughObject



12
13
14
# File 'lib/crabfarm/crabtrap_context.rb', line 12

def pass_through
  restart_with_options(mode: :pass) if @runner.nil? or @runner.mode != :pass
end

#releaseObject



24
25
26
27
# File 'lib/crabfarm/crabtrap_context.rb', line 24

def release
  super
  stop_daemon
end

#replay(_path) ⇒ Object



20
21
22
# File 'lib/crabfarm/crabtrap_context.rb', line 20

def replay(_path)
  restart_with_options(mode: :replay, bucket_path: _path)
end