Exception: Puppet::Module::Task::Error

Inherits:
Error
  • Object
show all
Defined in:
lib/puppet/module/task.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#original

Instance Method Summary collapse

Constructor Details

#initialize(message, kind, details = nil) ⇒ Error


7
8
9
10
11
# File 'lib/puppet/module/task.rb', line 7

def initialize(message, kind, details = nil)
  super(message)
  @details = details || {}
  @kind = kind
end

Instance Attribute Details

#detailsObject

Returns the value of attribute details


6
7
8
# File 'lib/puppet/module/task.rb', line 6

def details
  @details
end

#kindObject

Returns the value of attribute kind


6
7
8
# File 'lib/puppet/module/task.rb', line 6

def kind
  @kind
end

Instance Method Details

#to_hObject


13
14
15
16
17
18
19
# File 'lib/puppet/module/task.rb', line 13

def to_h
  {
    msg: message,
    kind: kind,
    details: details
  }
end