class Puppet::DataTypes::Error

Attributes

details[R]
issue_code[R]
kind[R]
message[R]
msg[R]

Public Class Methods

from_asserted_hash(hash) click to toggle source
  # File lib/puppet/datatypes/impl/error.rb
5 def self.from_asserted_hash(hash)
6   new(hash['msg'], hash['kind'], hash['details'], hash['issue_code'])
7 end
new(msg, kind = nil, details = nil, issue_code = nil) click to toggle source
   # File lib/puppet/datatypes/impl/error.rb
17 def initialize(msg, kind = nil, details = nil, issue_code = nil)
18   @msg = msg
19   @kind = kind
20   @details = details
21   @issue_code = issue_code
22 end

Public Instance Methods

==(o)
Alias for: eql?
_pcore_init_hash() click to toggle source
   # File lib/puppet/datatypes/impl/error.rb
 9 def _pcore_init_hash
10   result = { 'msg' => @msg }
11   result['kind'] = @kind unless @kind.nil?
12   result['details'] = @details unless @details.nil?
13   result['issue_code'] = @issue_code unless @issue_code.nil?
14   result
15 end
eql?(o) click to toggle source
   # File lib/puppet/datatypes/impl/error.rb
24 def eql?(o)
25   self.class.equal?(o.class) &&
26     @msg == o.msg &&
27     @kind == o.kind &&
28     @issue_code == o.issue_code &&
29     @details == o.details
30 end
Also aliased as: ==
hash() click to toggle source
   # File lib/puppet/datatypes/impl/error.rb
33 def hash
34   @msg.hash ^ @kind.hash ^ @issue_code.hash
35 end
to_s() click to toggle source
   # File lib/puppet/datatypes/impl/error.rb
37 def to_s
38   Puppet::Pops::Types::StringConverter.singleton.convert(self)
39 end