Sha256: fe078621d30837f834054ba424d90460696b9130968176e447151c4ccdabf31d
Contents?: true
Size: 508 Bytes
Versions: 2
Compression:
Stored size: 508 Bytes
Contents
$:.push 'lib'; require 'transcriber' class Customer < Transcriber::Resource property :login property :password property :some_text, if: proc {password == "abc"} end root = Customer.parse({"login" => 2000, "password" => "abc", "some_text" => "some text"}).first puts "root: #{root.inspect}" puts "resource: #{root.resource}" root = Customer.parse({"login" => 2000, "password" => "abcd", "some_text" => "some text II"}).first puts "root: #{root.inspect}" puts "resource: #{root.resource}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
transcriber-0.0.3 | examples/properties/with_if.rb |
transcriber-0.0.2 | examples/properties/with_if.rb |