Class: Kiev::Shoryuken::Middleware::TreePathSuffix

Inherits:
Object
  • Object
show all
Defined in:
lib/kiev/shoryuken/middleware/tree_path_suffix.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag) ⇒ TreePathSuffix

Returns a new instance of TreePathSuffix.



7
8
9
# File 'lib/kiev/shoryuken/middleware/tree_path_suffix.rb', line 7

def initialize(tag)
  @tag = tag.dup.freeze
end

Instance Method Details

#call(_worker, _queue, _message, _body) ⇒ Object



11
12
13
14
15
16
# File 'lib/kiev/shoryuken/middleware/tree_path_suffix.rb', line 11

def call(_worker, _queue, _message, _body)
  request_store = Kiev::RequestStore.store
  request_store[:tree_path] ||= ""
  request_store[:tree_path] += @tag
  yield
end