Class: PuppetDebugServer::DebugSession::ActualPuppetSessionState
- Inherits:
-
Object
- Object
- PuppetDebugServer::DebugSession::ActualPuppetSessionState
- 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
-
#compiler ⇒ Puppet::Parser::Compiler
readonly
The compiler used to compile the catalog.
-
#pops_depth_level ⇒ Integer
readonly
The depth of AST objects during a catalog compilation.
Instance Method Summary collapse
-
#decrement_pops_depth ⇒ Object
Signals that an AST object has completed evaluated.
-
#increment_pops_depth ⇒ Object
Signals that an AST object is starting to be evaluated.
-
#initialize ⇒ ActualPuppetSessionState
constructor
A new instance of ActualPuppetSessionState.
-
#reset! ⇒ Object
Resets back to initial state.
-
#update_compiler(value) ⇒ Object
Sets the compiler object.
Constructor Details
#initialize ⇒ ActualPuppetSessionState
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
#compiler ⇒ Puppet::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_level ⇒ Integer (readonly)
The depth of AST objects during a catalog compilation.
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_depth ⇒ Object
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_depth ⇒ Object
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 |