Class: PuppetDebugServer::DebugSession::PuppetSessionState

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet-debugserver/debug_session/puppet_session_state.rb

Overview

The actual and saved state of Puppet during a debug session.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePuppetSessionState

Returns a new instance of PuppetSessionState.



15
16
17
18
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 15

def initialize
  @actual = ActualPuppetSessionState.new
  @saved = SavedPuppetSessionState.new
end

Instance Attribute Details

#actualPuppetDebugServer::DebugSession::ActualPuppetSessionState (readonly)

The actual, current state of Puppet during a debug session.



9
10
11
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 9

def actual
  @actual
end

#savedPuppetDebugServer::DebugSession::SavedPuppetSessionState (readonly)

The state of Puppet when a debug session was paused, typically during a breakpoint or exception.



13
14
15
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 13

def saved
  @saved
end

Instance Method Details

#clear!Object

Clears the saved state. Typically only used when a paused debug session is about to start again.



21
22
23
24
25
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 21

def clear!
  @saved.clear!

  self
end