Ruby: File serialize basics