Sha256: 5a2e587b89ffb4cf5158e85aaf0f7e8a566fd079cfb0881b479c53f8aff0c02f

Contents?: true

Size: 528 Bytes

Versions: 1

Compression:

Stored size: 528 Bytes

Contents

module Daijobu
  module Scheme
    
    # Daijobu::Scheme::Eval is the serialization for pure Ruby code.
    # Theoretically, then, anything could be put into and taken out of a key-value-store,
    # provided that they're always rehydrated into an appropriate binding.
    class Eval
      
      # Parses by #eval'ing the string.
      def parse(str)
        str.nil? ? nil : eval(str)
      end
      
      # Unparses by #inspect'ing the object. 
      def unparse(obj)
        obj.inspect
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sander6-daijobu-0.2.1 lib/daijobu/schemes/eval.rb