Sha256: a0920b0cd0d654da4ebe92e0ecd158f105435cd9bfed770f2df27f49c20d2fe8

Contents?: true

Size: 569 Bytes

Versions: 28

Compression:

Stored size: 569 Bytes

Contents

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

class Customer < RestModel
  properties :login, :name
  embeds_one :address
end

class Address < RestModel
  properties :street, :number, :hint
end

@root = Customer.new(login: 'jackiechan2010',
                     name: "Jackie Chan",
                     address: {
                       street: "Aurora St",
                       number: 1833,
                       hint: "near gas station"
                     })

inspect_rest_model(@root)
puts "root.to_source without hint: #{@root.to_source(address: {without: :hint})}"

Version data entries

28 entries across 28 versions & 1 rubygems

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