Sha256: 87920051070d7579d06977ebd9ac815bacbd2e92af281c8cbc06c4f665c5fd86
Contents?: true
Size: 462 Bytes
Versions: 2
Compression:
Stored size: 462 Bytes
Contents
$:.push 'lib'; require 'transcriber' class Item < Transcriber::Resource property :id end class Root < Transcriber::Resource property :id embeds_many :items, if: proc {id == "10"} end root = Root.parse({"id" => 10, "items" => [{"id" => 2000}]}).first puts "root: #{root.inspect}" puts "resource: #{root.resource}" root = Root.parse({"id" => 1, "items" => [{"id" => 2000}]}).first puts "root: #{root.inspect}" puts "resource: #{root.resource}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
transcriber-0.0.3 | examples/embeds_many/with_if.rb |
transcriber-0.0.2 | examples/embeds_many/with_if.rb |