Sha256: 21741544d0d91580e1415b05662bc7728b07fbaf12716c155605a1d583f58ac9

Contents?: true

Size: 461 Bytes

Versions: 22

Compression:

Stored size: 461 Bytes

Contents

module Acfs
  module Util
    # TODO: Merge wit features in v1.0
    module Callbacks
      def __callbacks__
        @__callbacks__ ||= []
      end

      def __invoke__
        __callbacks__.each {|c| c.call self }
      end
    end

    # TODO: Replace delegator with promise or future for the long run.
    class ResourceDelegator < SimpleDelegator
      delegate :class, :is_a?, :kind_of?, :nil?, to: :__getobj__
      include Callbacks
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
acfs-1.3.2 lib/acfs/util.rb
acfs-1.3.1 lib/acfs/util.rb
acfs-1.3.0 lib/acfs/util.rb
acfs-1.2.1 lib/acfs/util.rb
acfs-0.50.0 lib/acfs/util.rb
acfs-1.2.0 lib/acfs/util.rb
acfs-0.49.1 lib/acfs/util.rb
acfs-1.1.1 lib/acfs/util.rb
acfs-0.49.0 lib/acfs/util.rb
acfs-1.1.0 lib/acfs/util.rb
acfs-0.48.2 lib/acfs/util.rb
acfs-1.0.1 lib/acfs/util.rb
acfs-0.48.1 lib/acfs/util.rb
acfs-1.0.0 lib/acfs/util.rb
acfs-0.48.0 lib/acfs/util.rb
acfs-0.47.0 lib/acfs/util.rb
acfs-0.46.0 lib/acfs/util.rb
acfs-0.45.0 lib/acfs/util.rb
acfs-0.44.0 lib/acfs/util.rb
acfs-0.43.2 lib/acfs/util.rb