Sha256: fbb3b95d6ac047ef7aee7de7f9d8b1987fc5eee680ebf52448ff232f0ea45bac

Contents?: true

Size: 303 Bytes

Versions: 26

Compression:

Stored size: 303 Bytes

Contents

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

class Customer < RestModel
  property :name
  embeds_one :address
end

class Address < RestModel
  properties :street, :number
end

@root = Customer.new({
  name: "Jackie Chan",
  address: {
    street: "Aurora St",
    number: 666
  }})

inspect_rest_model(@root)

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rest_model-0.2.0 examples/initialize/embeds_one.rb
rest_model-0.1.24 examples/initialize/embeds_one.rb
rest_model-0.1.23 examples/initialize/embeds_one.rb
rest_model-0.1.22 examples/initialize/embeds_one.rb
rest_model-0.1.21 examples/initialize/embeds_one.rb
rest_model-0.1.20 examples/initialize/embeds_one.rb
rest_model-0.1.19 examples/initialize/embeds_one.rb
rest_model-0.1.18 examples/initialize/embeds_one.rb
rest_model-0.1.17 examples/initialize/embeds_one.rb
rest_model-0.1.16 examples/initialize/embeds_one.rb
rest_model-0.1.15 examples/initialize/embeds_one.rb
rest_model-0.1.14 examples/initialize/embeds_one.rb
rest_model-0.1.13 examples/initialize/embeds_one.rb
rest_model-0.1.12 examples/initialize/embeds_one.rb
rest_model-0.1.11 examples/initialize/embeds_one.rb
rest_model-0.1.10 examples/initialize/embeds_one.rb
rest_model-0.1.9 examples/initialize/embeds_one.rb
rest_model-0.1.8 examples/initialize/embeds_one.rb
rest_model-0.1.7 examples/initialize/embeds_one.rb
rest_model-0.1.6 examples/initialize/embeds_one.rb