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.3.1 examples/to_source/embeds_one_without_key.rb
rest_model-0.3.0 examples/to_source/embeds_one_without_key.rb
rest_model-0.2.3 examples/to_source/embeds_one_without_key.rb
rest_model-0.2.1 examples/to_source/embeds_one_without_key.rb
rest_model-0.2.0 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.24 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.23 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.22 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.21 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.20 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.19 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.18 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.17 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.16 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.15 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.14 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.13 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.12 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.11 examples/to_source/embeds_one_without_key.rb
rest_model-0.1.10 examples/to_source/embeds_one_without_key.rb