Sha256: 0e3164f2edf1f57550a2b8a8814b4f5fb4ecee664d8daa424c6ed1fa02d154e4

Contents?: true

Size: 381 Bytes

Versions: 11

Compression:

Stored size: 381 Bytes

Contents

module Volt
  # Included in model's so they can inform the ArrayModel when new listeners are added or removed.
  module ListenerTracker
    # Called when data from this model begins being watched
    def listener_added
      @listener_count ||= 0
      @listener_count += 1
    end

    def listener_removed
      @listener_count ||= 0
      @listener_count -= 1
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
volt-0.9.4.pre3 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.4.pre2 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.4.pre1 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3.pre6 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3.pre5 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3.pre4 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3.pre3 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3.pre2 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.3.pre1 lib/volt/models/model_helpers/listener_tracker.rb
volt-0.9.2 lib/volt/models/listener_tracker.rb