Module: Tinker::Context::Roster::Synchronize

Defined in:
lib/tinker/context/roster.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Raises:

  • (ArgumentError)


3
4
5
6
7
8
9
10
# File 'lib/tinker/context/roster.rb', line 3

def self.included(base)
  raise ArgumentError, 'Must be included in a `Tinker::Context`' unless base < Tinker::Context

  base.send :include, InstanceMethods

  base.on "client.join", :synchronize_roster
  base.on "client.leave", :synchronize_roster
end