Module: MakeWatchable

Defined in:
lib/make_watchable.rb,
lib/make_watchable/version.rb,
lib/make_watchable/watcher.rb,
lib/make_watchable/watching.rb,
lib/make_watchable/watchable.rb,
lib/make_watchable/exceptions.rb

Defined Under Namespace

Modules: Exceptions, Watchable, Watcher Classes: Watching

Constant Summary collapse

VERSION =
"0.0.3"

Instance Method Summary collapse

Instance Method Details

#make_watchableObject

Specify a model as watchable.

Example: class Repository < ActiveRecord::Base

make_watchable

end



21
22
23
# File 'lib/make_watchable.rb', line 21

def make_watchable
  include Watchable
end

#make_watcher(options = {}) ⇒ Object

Specify a model as watcher.

Example: class User < ActiveRecord::Base

make_watcher

end



31
32
33
# File 'lib/make_watchable.rb', line 31

def make_watcher(options = {})
  include Watcher
end

#watchable?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/make_watchable.rb', line 7

def watchable?
  false
end

#watcher?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/make_watchable.rb', line 11

def watcher?
  false
end