Class: MultipleMan::Subscribers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/multiple_man/subscribers/base.rb

Direct Known Subclasses

ModelSubscriber

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Base

Returns a new instance of Base.



4
5
6
# File 'lib/multiple_man/subscribers/base.rb', line 4

def initialize(klass)
  self.klass = klass
end

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



8
9
10
# File 'lib/multiple_man/subscribers/base.rb', line 8

def klass
  @klass
end

Instance Method Details

#create(_) ⇒ Object



10
11
12
# File 'lib/multiple_man/subscribers/base.rb', line 10

def create(_)
  # noop
end

#destroy(_) ⇒ Object



18
19
20
# File 'lib/multiple_man/subscribers/base.rb', line 18

def destroy(_)
  # noop
end

#listen_toObject



30
31
32
# File 'lib/multiple_man/subscribers/base.rb', line 30

def listen_to
  klass
end

#routing_key(operation = :'#') ⇒ Object



26
27
28
# File 'lib/multiple_man/subscribers/base.rb', line 26

def routing_key(operation = :'#')
  MultipleMan::RoutingKey.new(klass, operation).to_s
end

#seed(_) ⇒ Object



22
23
24
# File 'lib/multiple_man/subscribers/base.rb', line 22

def seed(_)
  # noop
end

#update(_) ⇒ Object



14
15
16
# File 'lib/multiple_man/subscribers/base.rb', line 14

def update(_)
  # noop
end