Sha256: cfb9b2b435c585b7356049d207759f3cf94ceba97acf22b1d545632e0826cdef

Contents?: true

Size: 559 Bytes

Versions: 468

Compression:

Stored size: 559 Bytes

Contents

require 'puppet/indirector'

class Puppet::IndirectorTesting
  extend Puppet::Indirector
  indirects :indirector_testing

  # We should have some way to identify if we got a valid object back with the
  # current values, no?
  attr_accessor :value
  alias_method :name, :value
  alias_method :name=, :value=
  def initialize(value)
    self.value = value
  end

  def self.from_binary(raw)
    new(raw)
  end

  def self.from_data_hash(data)
    new(data['value'])
  end

  def to_binary
    value
  end

  def to_data_hash
    { 'value' => value }
  end
end

Version data entries

468 entries across 468 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/lib/puppet/indirector_testing.rb
puppet-8.3.0-x86-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-8.3.0-x64-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-8.3.0-universal-darwin spec/lib/puppet/indirector_testing.rb
puppet-8.4.0 spec/lib/puppet/indirector_testing.rb
puppet-8.4.0-x86-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-8.4.0-x64-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-8.4.0-universal-darwin spec/lib/puppet/indirector_testing.rb
puppet-7.28.0 spec/lib/puppet/indirector_testing.rb
puppet-7.28.0-x86-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-7.28.0-x64-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-7.28.0-universal-darwin spec/lib/puppet/indirector_testing.rb
puppet-8.3.1 spec/lib/puppet/indirector_testing.rb
puppet-8.3.1-x86-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-8.3.1-x64-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-8.3.1-universal-darwin spec/lib/puppet/indirector_testing.rb
puppet-7.27.0 spec/lib/puppet/indirector_testing.rb
puppet-7.27.0-x86-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-7.27.0-x64-mingw32 spec/lib/puppet/indirector_testing.rb
puppet-7.27.0-universal-darwin spec/lib/puppet/indirector_testing.rb