Sha256: c1f65675cc7be2e8c93648a7ff3aa0ccf57befcfe55df4388b9b52a718d01e2e
Contents?: true
Size: 269 Bytes
Versions: 1
Compression:
Stored size: 269 Bytes
Contents
class Object def to_burlap dict = {} vars = instance_variables.map do |var| key = var[/^@(.*)$/, 1] value = instance_variable_get(var) [key, value] end.sort_by {|e| e.first } Burlap::Hash[vars, self.class.to_s].to_burlap end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
burlap-1.0.0 | lib/burlap/core_ext/object.rb |