Exception: Exception

Defined in:
lib/icss/serialization/zaml.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.yaml_new(klass, tag, val) ⇒ Object



276
277
278
279
280
281
282
# File 'lib/icss/serialization/zaml.rb', line 276

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 = ZAML.new) ⇒ Object



260
261
262
263
264
265
266
267
# File 'lib/icss/serialization/zaml.rb', line 260

def to_zaml(z=ZAML.new)
  z.emit(zamlized_class_name(Exception)+" ")
  z.nested {
    z.nl("message: ")
    message.to_zaml(z)
  }
  z.to_s
end