1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
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
|