Module: SimpleMarshal::Struct1

Defined in:
lib/appswarm/simple_marshal_parser.rb

Instance Method Summary collapse

Instance Method Details

#sloadObject



1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
# File 'lib/appswarm/simple_marshal_parser.rb', line 1168

def sload
    klass=getClass(name.text_value)
    mo=nil
    hash=l.sload
    if klass==Time
      mo=Time.parse(hash[:data])
    else
        mo=klass.new
        hash.each{|k,v|
          k=k.to_s
          mo.send(k+"=",v) if mo.members.member?(k) and mo.respond_to?(k+"=")
        }
    end
    mo
  
end