Sha256: b59c891b2bf85573563c85ca73209b9101370ccd18637c3268319fb40cebfa26
Contents?: true
Size: 399 Bytes
Versions: 2
Compression:
Stored size: 399 Bytes
Contents
require 'json' $:.push 'lib'; require 'transcriber' class Item < Transcriber::Resource property :id, field: :item_id end class Root < Transcriber::Resource embeds_many :items, start_key: 'detalhe.itens' end root = Root.parse({"detalhe" => {"itens" => [{"item_id" => 2000}]}}).first puts "root: #{root.inspect}" puts "resource: #{root.resource}" puts "to_json: #{root.resource.to_json}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
transcriber-0.0.3 | examples/embeds_many/with_start_key.rb |
transcriber-0.0.2 | examples/embeds_many/with_start_key.rb |