Class: Legion::Transport::InProcess::Exchange

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/transport/in_process.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel, type, name, _opts = {}) ⇒ Exchange

Returns a new instance of Exchange.



86
87
88
89
90
# File 'lib/legion/transport/in_process.rb', line 86

def initialize(channel, type, name, _opts = {})
  @channel = channel
  @type = type
  @name = name
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



84
85
86
# File 'lib/legion/transport/in_process.rb', line 84

def channel
  @channel
end

#nameObject (readonly)

Returns the value of attribute name.



84
85
86
# File 'lib/legion/transport/in_process.rb', line 84

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



84
85
86
# File 'lib/legion/transport/in_process.rb', line 84

def type
  @type
end

Instance Method Details

#deleteObject



96
97
98
# File 'lib/legion/transport/in_process.rb', line 96

def delete(**)
  true
end

#publish(payload, routing_key: '') ⇒ Object



92
93
94
# File 'lib/legion/transport/in_process.rb', line 92

def publish(payload, routing_key: '', **)
  Legion::Transport::Local.publish(@name, routing_key, payload)
end