Sha256: 7277fde5addd69528ab7c2b61839510023237383bfded846b6b7e1ee89382287
Contents?: true
Size: 627 Bytes
Versions: 6
Compression:
Stored size: 627 Bytes
Contents
$:.push 'lib'; require 'transcriber' class Service < Transcriber::Resource property :name belongs_to :customer end class Billing < Transcriber::Resource property :login belongs_to :customer end class Developer < Transcriber::Resource property :login belongs_to :customer end class Customer < Transcriber::Resource id field: :customer_id, type: Integer property :login has_many :services has_one :billing has_one :devops, class_name: :developer end @root = Customer.parse({"customer_id" => 123, "login" => 'jackiechan2010'}).first puts "root: #{@root.inspect}" puts "resource: #{@root.resource}"
Version data entries
6 entries across 6 versions & 1 rubygems