lib/zeamays/cob/defreezing.rb in zeamays-0.0.6 vs lib/zeamays/cob/defreezing.rb in zeamays-0.0.7

- old
+ new

@@ -1,9 +1,9 @@ module Zeamays class Cob module Defreezing - def unpack(packed_string) + def deserialized(packed_string) unpacked_list = [] left_string = packed_string while left_string.size != 0 do unpacked = left_string.unpack(package_pattern + tail_pattern) @@ -13,14 +13,16 @@ unpacked_list end def defreeze(freezed) cob = Cob.new - unpack(freezed).each do |row| + deserialized(freezed).each do |row| cob.grow!(row) end cob end + alias unpack defreeze + alias depack defreeze private def tail_pattern 'a*' end