Class: MultipleMan::RoutingKey

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

Constant Summary collapse

ALLOWED_OPERATIONS =
[:create, :update, :destroy, :"#"]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, operation = :"#") ⇒ RoutingKey

Returns a new instance of RoutingKey.



5
6
7
8
# File 'lib/multiple_man/routing_key.rb', line 5

def initialize(klass, operation = :"#")
  self.klass = klass
  self.operation = operation
end

Instance Attribute Details

#klass ⇒ Object

Returns the value of attribute klass.



15
16
17
# File 'lib/multiple_man/routing_key.rb', line 15

def klass
  @klass
end

#operation ⇒ Object

Returns the value of attribute operation.



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

def operation
  @operation
end

Instance Method Details

#to_s ⇒ Object



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

def to_s
  "#{topic_name}.#{klass}.#{operation}"
end