Class: LaGear::Publisher

Inherits:
Sneakers::Publisher
  • Object
show all
Defined in:
lib/la_gear/publisher.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exchangeObject

Returns the value of attribute exchange.



3
4
5
# File 'lib/la_gear/publisher.rb', line 3

def exchange
  @exchange
end

Class Method Details

.serialize(msg) ⇒ Object



9
10
11
# File 'lib/la_gear/publisher.rb', line 9

def self.serialize(msg)
  msg.to_json
end

Instance Method Details

#publish(msg, opts = {}) ⇒ Object



5
6
7
# File 'lib/la_gear/publisher.rb', line 5

def publish(msg, opts = {})
  super(self.class.serialize(msg), opts)
end