Sha256: 4779afafcc70168a191a1922413a4ed6e233b8d31a2e6377399ab91ab5ebfeec

Contents?: true

Size: 436 Bytes

Versions: 2

Compression:

Stored size: 436 Bytes

Contents

# -*- coding: utf-8 -*-
require "pb_actor/version"
require "pb_actor/proxy"

module PbActor
  class << self
    def included base
      base.send :include, InstanceMethods
      base.send :extend, ClassMethods
    end
  end

  module ClassMethods
    def new *args, &blk
      origin = allocate
      proxy = Proxy.new origin
      proxy.async.send :initialize, *args, &blk
      proxy
    end
  end

  module InstanceMethods
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pb_actor-0.0.2 lib/pb_actor.rb
pb_actor-0.0.1 lib/pb_actor.rb