Sha256: af94f33cf618734910ae96433c9d0e602f56310e567d17e236f128dcc081b95e

Contents?: true

Size: 590 Bytes

Versions: 13

Compression:

Stored size: 590 Bytes

Contents

$:.push 'lib'; require 'transcriber'

class Customer < Transcriber::Resource
  properties :login, :name
  embeds_many :phones
end

class Phone < Transcriber::Resource
  properties :number, :extension, :description
end

@root = Customer.new({
  login: 'jackiechan2010',
  name: "Jackie Chan",
  phones: [
   {
     number: "897289472",
     extension: "3897",
     description: "abab"
   },
   {
     number: "987198732",
     extension: "1897",
     description: "eheh"
   }
  ]
})

puts "root.to_input: #{@root.to_input(phones: {without: :description})}"
puts "root:     #{@root.inspect}"

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
transcriber-0.0.26 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.25 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.24 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.23 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.22 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.21 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.20 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.19 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.18 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.17 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.16 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.15 examples/to_input/embeds_many_without_key.rb
transcriber-0.0.14 examples/to_input/embeds_many_without_key.rb