Sha256: c1d1f99d0c26838e95c81b48bce68e533bd234b64c7ab51a4bbefdf2c80c154f

Contents?: true

Size: 600 Bytes

Versions: 28

Compression:

Stored size: 600 Bytes

Contents

$:.push 'examples'; require 'helper'

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

class Phone < RestModel
  properties :number, :extension
end

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

inspect_rest_model(@root)

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rest_model-0.1.9 examples/to_source/embeds_many.rb
rest_model-0.1.8 examples/to_source/embeds_many.rb
rest_model-0.1.7 examples/to_source/embeds_many.rb
rest_model-0.1.6 examples/to_source/embeds_many.rb
rest_model-0.1.5 examples/to_source/embeds_many.rb
rest_model-0.1.4 examples/to_source/embeds_many.rb
rest_model-0.1.3 examples/to_source/embeds_many.rb
rest_model-0.1.2 examples/to_source/embeds_many.rb