Class: Puppet::ResourceApi::IOContext

Inherits:
BaseContext show all
Defined in:
lib/puppet/resource_api/io_context.rb

Overview

Implement Resource API Conext to log through an IO object, defaulting to ‘$stderr`. There is no access to a device here. You can supply a transport if necessary.

Instance Attribute Summary collapse

Attributes inherited from BaseContext

#type

Instance Method Summary collapse

Methods inherited from BaseContext

#attribute_changed, #device, #failed, #failed?, #failing, #feature_support?, #log_exception, #processed, #processing, #reset_failed

Constructor Details

#initialize(definition, target = $stderr, transport = nil) ⇒ IOContext

Returns a new instance of IOContext.



10
11
12
13
14
# File 'lib/puppet/resource_api/io_context.rb', line 10

def initialize(definition, target = $stderr, transport = nil)
  super(definition)
  @target = target
  @transport = transport
end

Instance Attribute Details

#transportObject (readonly)

Returns the value of attribute transport.



8
9
10
# File 'lib/puppet/resource_api/io_context.rb', line 8

def transport
  @transport
end