Sha256: 72b137685acfe28f9e03f0b0354e5ee5d1bdfb64c8e9a13ae0213476c419b56e
Contents?: true
Size: 519 Bytes
Versions: 17
Compression:
Stored size: 519 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_with_items = Root.parse({id: 10, items: [{id: 2000}]}).first puts "root: #{@root_with_items.inspect}" puts "resource: #{@root_with_items.resource}" @root_without_items = Root.parse({id: 1, items: [{id: 2000}]}).first puts "root: #{@root_without_items.inspect}" puts "resource: #{@root_without_items.resource}"
Version data entries
17 entries across 17 versions & 1 rubygems