Sha256: 8dc893af4af764e4d7cf66198ff2cf4c04cef85dc5a6466c2a61ec2635001d84

Contents?: true

Size: 653 Bytes

Versions: 5

Compression:

Stored size: 653 Bytes

Contents

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

RestModel::Configuration.configure do |c|
  c.true_value = "X"
  c.false_value = ""
  c.date_format = "%Y%m%d"
end

class Customer < RestModel
  property :login
  property :age,      type: Integer
  property :birth,    type: Date
  property :active,   type: Boolean
  property :services, type: Enumerable
  property :balance,  type: Float
end

@root = Customer.new(login: 'jackiechan2010',
                     age: 22,
                     birth: "1990-07-04",
                     active: true,
                     services: ["Hosting", "Email"],
                     balance: 200.00)

inspect_rest_model(@root)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rest_model-0.1.6 examples/to_source/serializables.rb
rest_model-0.1.5 examples/to_source/serializables.rb
rest_model-0.1.4 examples/to_source/serializables.rb
rest_model-0.1.3 examples/to_source/serializables.rb
rest_model-0.1.2 examples/to_source/serializables.rb