Class: PuppetDebugServer::DebugSession::ActualPuppetSessionState

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

Overview

The actual state of Puppet during a debug session

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActualPuppetSessionState

Returns a new instance of ActualPuppetSessionState.



38
39
40
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 38

def initialize
  @pops_depth_level = 0
end

Instance Attribute Details

#compilerPuppet::Parser::Compiler (readonly)

The compiler used to compile the catalog



36
37
38
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 36

def compiler
  @compiler
end

#pops_depth_levelInteger (readonly)

The depth of AST objects during a catalog compilation.

Returns:

  • (Integer)


32
33
34
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 32

def pops_depth_level
  @pops_depth_level
end

Instance Method Details

#decrement_pops_depthObject

Signals that an AST object has completed evaluated. Typically used during catalog compilation.



59
60
61
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 59

def decrement_pops_depth
  @pops_depth_level -= 1
end

#increment_pops_depthObject

Signals that an AST object is starting to be evaluated. Typically used during catalog compilation.



54
55
56
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 54

def increment_pops_depth
  @pops_depth_level += 1
end

#reset!Object

Resets back to initial state. Typically used when a debug session first starts.



43
44
45
46
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 43

def reset!
  @pops_depth_level = 0
  @compiler = nil
end

#update_compiler(value) ⇒ Object

Sets the compiler object. Typically set when a debug session begins catalog compilation.



49
50
51
# File 'lib/puppet-debugserver/debug_session/puppet_session_state.rb', line 49

def update_compiler(value)
  @compiler = value
end