Module: PuppetX::Relay::Agent::Model::Stateful

Included in:
PlanRun, Run, TaskRun
Defined in:
lib/puppet_x/relay/agent/model/stateful.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idString (readonly)

Returns:

  • (String)


13
14
15
# File 'lib/puppet_x/relay/agent/model/stateful.rb', line 13

def id
  @id
end

#stateState (readonly)

Returns:



16
17
18
# File 'lib/puppet_x/relay/agent/model/stateful.rb', line 16

def state
  @state
end

Instance Method Details

#with_state(state) ⇒ self

Parameters:

Returns:

  • (self)


20
21
22
23
24
# File 'lib/puppet_x/relay/agent/model/stateful.rb', line 20

def with_state(state)
  upd = dup
  upd.instance_variable_set(:@state, state)
  upd
end