about summary refs log tree commit homepage
path: root/HACKING
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-08-24 09:54:45 +0000
committerEric Wong <normalperson@yhbt.net>2013-08-24 09:54:45 +0000
commit3e09ac0c10c95bb24a08af62393b4f761e2743d0 (patch)
tree778dffa2ba8798503fc047db0feef6d65426ea22 /HACKING
downloaddtas-3e09ac0c10c95bb24a08af62393b4f761e2743d0.tar.gz
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING12
1 files changed, 12 insertions, 0 deletions
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..88b675b
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,12 @@
+serialization (dtas-player)
+---------------------------
+
+* objects serialize using the "to_hsh" method (like "to_hash", but omits
+  default values) and then to YAML.  We avoid exposing the fact we use
+  Ruby (or any programming language) in any formats.
+
+* every serializable class defines a "load" singleton method which takes the
+  output Hash of "to_hsh"
+
+* we avoid serializing default values to make the state file shorter and
+  more suitable for human viewing and editing.