# class Puppet::Util::Instrumentation::Data

This is just a transport class to be used through the instrumentation_data indirection. All the data resides in the real underlying listeners which this class delegates to.

### Attributes

listener[R]

### Public Class Methods

from_pson(data) click to toggle source

    # File lib/puppet/util/instrumentation/data.rb, line 31
    def self.from_pson(data)
      data
    end

new(listener_name) click to toggle source

    # File lib/puppet/util/instrumentation/data.rb, line 14
    def initialize(listener_name)
      @listener = Puppet::Util::Instrumentation[listener_name]
      raise "Listener #{listener_name} wasn't registered" unless @listener
    end

### Public Instance Methods

name() click to toggle source

    # File lib/puppet/util/instrumentation/data.rb, line 19
    def name
      @listener.name
    end

to_pson(*args) click to toggle source

    # File lib/puppet/util/instrumentation/data.rb, line 23
    def to_pson(*args)
      result = {
        'document_type' => "Puppet::Util::Instrumentation::Data",
        'data' => { :name => name }.merge(@listener.respond_to?(:data) ? @listener.data : {})
      }
      result.to_pson(*args)
    end