Created
September 30, 2015 14:25
-
-
Save rjhornsby/7b820f7862955fbe3a80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== constructing a dog == | |
== constructing an animal == | |
Pets rendered as JSON: | |
[{"json_class":"Dog","data":{"has_fur":true,"color":"black","name":"fido","bark":"loud"}}] | |
=== Recovering lost pets from the evil JSON Deville === | |
Calling Dog::json_create | |
{"json_class"=>"Dog", | |
"data"=>{"has_fur"=>true, "color"=>"black", "name"=>"fido", "bark"=>"loud"}} | |
== constructing a dog == | |
== constructing an animal == | |
=== Here are your lost pets === | |
[#<Dog:0x007fc7991e6140 | |
@bark="loud", | |
@color="black", | |
@has_fur=true, | |
@name="fido">] | |
Process finished with exit code 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment