Sha256: 5139eaaa99874672a8e4fbd09162b51e659f4335505c7e1c987aa10cbcbd4802

Contents?: true

Size: 742 Bytes

Versions: 10

Compression:

Stored size: 742 Bytes

Contents

require 'puppet/indirector'

class Puppet::Status
  extend Puppet::Indirector
  indirects :status, :terminus_class => :local

  attr :status, true

  def initialize( status = nil )
    @status = status || {"is_alive" => true}
  end

  def to_data_hash
    @status
  end

  def self.from_data_hash(data)
    if data.include?('status')
      self.new(data['status'])
    else
      self.new(data)
    end
  end

  def self.from_pson(pson)
    Puppet.deprecation_warning("from_pson is being removed in favour of from_data_hash.")
    self.from_data_hash(pson)
  end

  def name
    "status"
  end

  def name=(name)
    # NOOP
  end

  def version
    @status['version']
  end

  def version=(version)
    @status['version'] = version
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
puppet-3.5.1 lib/puppet/status.rb
puppet-3.5.1-x86-mingw32 lib/puppet/status.rb
puppet-3.5.1.rc1 lib/puppet/status.rb
puppet-3.5.1.rc1-x86-mingw32 lib/puppet/status.rb
puppet-3.5.0.rc3 lib/puppet/status.rb
puppet-3.5.0.rc3-x86-mingw32 lib/puppet/status.rb
puppet-3.5.0.rc2 lib/puppet/status.rb
puppet-3.5.0.rc2-x86-mingw32 lib/puppet/status.rb
puppet-3.5.0.rc1 lib/puppet/status.rb
puppet-3.5.0.rc1-x86-mingw32 lib/puppet/status.rb