Sha256: d9be9b1c7c129a50d11ab1dba2fa781467f7e7c44156c5b9cb58a54ea4f19047

Contents?: true

Size: 558 Bytes

Versions: 1

Compression:

Stored size: 558 Bytes

Contents

class UserService < Acfs::Service
  self.base_url = 'http://users.example.org'
  use Acfs::Middleware::MessagePackDecoder
  use Acfs::Middleware::JsonDecoder
end

class CommentService < Acfs::Service
  self.base_url = 'http://comments.example.org'
  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 Comment
  include Acfs::Model
  service CommentService

  attribute :text, :string
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acfs-0.7.0 spec/support/service.rb