Sha256: d7f726e741acfde4ff920aed009b525c5d22995930ad0d0d7dd02746c54344d4

Contents?: true

Size: 500 Bytes

Versions: 24

Compression:

Stored size: 500 Bytes

Contents

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

class Customer < RestModel
  property :login
  property :password
  property :description, if: proc {password == "abc"}
end

@root_with_description = Customer.from_source!({
  login: 2000,
  password: "abc",
  description: "description"}).first

inspect_rest_model(@root_with_description)

@root_without_description = Customer.from_source!({
  login: 2000,
  password: "abcd",
  description: "some text II"}).first

inspect_rest_model(@root_without_description)

Version data entries

24 entries across 24 versions & 1 rubygems

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