Exception: Exception

Defined in:
lib/vendor/puppet/util/zaml.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.yaml_new(klass, tag, val) ⇒ Object



263
264
265
266
267
268
269
# File 'lib/vendor/puppet/util/zaml.rb', line 263

def self.yaml_new( klass, tag, val )
  o = YAML.object_maker( klass, {} ).exception(val.delete( 'message'))
  val.each_pair do |k,v|
    o.instance_variable_set("@#{k}", v)
  end
  o
end

Instance Method Details

#to_zaml(z) ⇒ Object



248
249
250
251
252
253
254
# File 'lib/vendor/puppet/util/zaml.rb', line 248

def to_zaml(z)
  z.emit(zamlized_class_name(Exception))
  z.nested {
    z.nl("message: ")
    message.to_zaml(z)
  }
end