Created
November 28, 2011 18:36
-
-
Save divoxx/1401449 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| require 'roar' | |
| require 'roar/representer/json' | |
| class Article | |
| include Roar::Representer::JSON | |
| property :title | |
| property :id | |
| end | |
| puts Article.new(title: "Foo", id: 123).to_json |
This file contains hidden or 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
| roar_test.rb:11:in `initialize': wrong number of arguments(1 for 0) (ArgumentError) | |
| from roar_test.rb:11:in `new' | |
| from roar_test.rb:11:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment