Sha256: f4b576b12699784420ad8646a8f0b7523550f67021d1c68f3e577cbfc687e002

Contents?: true

Size: 524 Bytes

Versions: 11

Compression:

Stored size: 524 Bytes

Contents

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

class Customer < Transcriber::Resource
  property :login, field: 'hidden.login'
  embeds_many :phones
end

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

@root = Customer.new({
  login: 'jackiechan2010',
  phones: [
    {
      number: "123123123",
      extension: "111"
    },
    {
      number: "098098098",
      extension: "999"
    }
  ]})

puts "root.to_input: #{@root.to_input}"


puts "root:     #{@root.inspect}"
puts "resource: #{@root.resource}"

Version data entries

11 entries across 11 versions & 1 rubygems

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