lib/ruote/util/serializer.rb in ruote-2.1.11 vs lib/ruote/util/serializer.rb in ruote-2.2.0
- old
+ new
@@ -1,7 +1,7 @@
#--
-# Copyright (c) 2005-2010, John Mettraux, jmettraux@gmail.com
+# Copyright (c) 2005-2011, John Mettraux, jmettraux@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -80,22 +80,22 @@
#
FLAVOURS = {
:marshal => MARSHAL, :marshal64 => MARSHAL64, :yaml => YAML
}
- def initialize (flavour)
+ def initialize(flavour)
@flavour = FLAVOURS[flavour] || MARSHAL64
@flavour[0].call # initializes the flavour
end
- def encode (o)
+ def encode(o)
@flavour[1].call(o)
end
- def decode (s)
+ def decode(s)
@flavour[2].call(s)
end
end
end