Sha256: b03f965ee5671c30440ebe56bdb39678c8ab1fccc086d491a407defe8866edd3

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

require 'make_watchable/watching'
require 'make_watchable/watchable'
require 'make_watchable/watcher'
require 'make_watchable/exceptions'

module MakeWatchable
  def watchable?
    false
  end

  def watcher?
    false
  end

  # Specify a model as watchable.
  #
  # Example:
  # class Repository < ActiveRecord::Base
  #   make_watchable
  # end
  def make_watchable
    include Watchable
  end

  # Specify a model as watcher.
  #
  # Example:
  # class User < ActiveRecord::Base
  #   make_watcher
  # end
  def make_watcher(options = {})
    include Watcher
  end
end

ActiveRecord::Base.extend MakeWatchable

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
make_watchable-0.0.3 lib/make_watchable.rb
make_watchable-0.0.2 lib/make_watchable.rb