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.1.5 examples/initialize/embeds_one.rb
rest_model-0.1.4 examples/initialize/embeds_one.rb
rest_model-0.1.3 examples/initialize/embeds_one.rb
rest_model-0.1.2 examples/initialize/embeds_one.rb
rest_model-0.1.1 examples/initialize/embeds_one.rb
rest_model-0.1.0 examples/initialize/embeds_one.rb