Sha256: c6a151a8602fd0adafe0226b44dae4b6391ac33f99f57041971fe212bba05d74

Contents?: true

Size: 292 Bytes

Versions: 8

Compression:

Stored size: 292 Bytes

Contents

module Putter
  module InstanceFollower
    @@putter_followed_instances = []

    def new(*args, &blk)
      result = super *args, &blk
      @@putter_followed_instances << result
      ::Putter.follow(result, label: "#{name} instance #{@@putter_followed_instances.count}")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
putter-0.7.0 lib/putter/instance_follower.rb
putter-0.6.1 lib/putter/instance_follower.rb
putter-0.6.0 lib/putter/instance_follower.rb
putter-0.5.1 lib/putter/instance_follower.rb
putter-0.5.0 lib/putter/instance_follower.rb
putter-0.4.1 lib/putter/instance_follower.rb
putter-0.4.0 lib/putter/instance_follower.rb
putter-0.3.0 lib/putter/instance_follower.rb