File: marshal.rb

package info (click to toggle)
libnora-ruby 1%3A0.0.20041021-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 408 kB
  • ctags: 722
  • sloc: ruby: 5,186; ansic: 669; makefile: 266; sql: 10
file content (20 lines) | stat: -rwxr-xr-x 474 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Web::Persistent::Serialize::Marshal
# Copyright(c) 2002 MoonWolf <moonwolf@moonwolf.com>
module Web
  class Persistent
    module Serialize
      module Marshal
        def self.dump(obj,port=nil)
          if port
            ::Marshal.dump(obj,port)
          else
            ::Marshal.dump(obj)
          end
        end 
        def self.restore(port)
          ::Marshal.restore(port)
        end
      end # Marshal
    end # Serialize
  end # Persistent
end # Web