Sha256: b729be7948c637b4b20b8fc504b1574f0043ad18c989804f50d296124debd22a

Contents?: true

Size: 623 Bytes

Versions: 17

Compression:

Stored size: 623 Bytes

Contents

$:.push 'lib'; require 'transcriber'

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

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


puts "root:     #{@root_with_description.inspect}"
puts "resource: #{@root_with_description.resource}"


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

puts "root:     #{@root_without_description.inspect}"
puts "resource: #{@root_without_description.resource}"

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
transcriber-0.0.26 examples/properties/with_if.rb
transcriber-0.0.25 examples/properties/with_if.rb
transcriber-0.0.24 examples/properties/with_if.rb
transcriber-0.0.23 examples/properties/with_if.rb
transcriber-0.0.22 examples/properties/with_if.rb
transcriber-0.0.21 examples/properties/with_if.rb
transcriber-0.0.20 examples/properties/with_if.rb
transcriber-0.0.19 examples/properties/with_if.rb
transcriber-0.0.18 examples/properties/with_if.rb
transcriber-0.0.17 examples/properties/with_if.rb
transcriber-0.0.16 examples/properties/with_if.rb
transcriber-0.0.15 examples/properties/with_if.rb
transcriber-0.0.14 examples/properties/with_if.rb
transcriber-0.0.13 examples/properties/with_if.rb
transcriber-0.0.12 examples/properties/with_if.rb
transcriber-0.0.11 examples/properties/with_if.rb
transcriber-0.0.10 examples/properties/with_if.rb