Sha256: 4f0799b5b7977a600c3c010c5ae0c02d4621fc2e5b6f992654a08e240fcbd252
Contents?: true
Size: 775 Bytes
Versions: 1
Compression:
Stored size: 775 Bytes
Contents
Acfs.configure do locate :user_service, 'http://users.example.org' locate :comment_service, 'http://comments.example.org' end class UserService < Acfs::Service use Acfs::Middleware::MessagePackDecoder use Acfs::Middleware::JsonDecoder use Acfs::Middleware::JsonEncoder end class CommentService < Acfs::Service use Acfs::Middleware::JsonDecoder end class MyUser include Acfs::Model service UserService, path: 'users' attribute :id, :integer attribute :name, :string, default: 'Anon' attribute :age, :integer end class Session include Acfs::Model service UserService attribute :id, :string attribute :user, :integer end class Comment include Acfs::Model service CommentService attribute :id, :integer attribute :text, :string end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acfs-0.16.0 | spec/support/service.rb |