Module: Emque::Producing::Message::ClassMethods

Defined in:
lib/emque/producing/message/message.rb

Instance Method Summary collapse

Instance Method Details

#message_type(name) ⇒ Object



19
20
21
# File 'lib/emque/producing/message/message.rb', line 19

def message_type(name)
  @message_type = name
end

#private_attribute(name, coercion = nil, opts = {}) ⇒ Object



27
28
29
30
31
# File 'lib/emque/producing/message/message.rb', line 27

def private_attribute(name, coercion=nil, opts={})
  @private_attrs ||= []
  @private_attrs << name
  attribute(name, coercion, opts)
end

#private_attrsObject



33
34
35
# File 'lib/emque/producing/message/message.rb', line 33

def private_attrs
  Array(@private_attrs)
end

#read_message_typeObject



23
24
25
# File 'lib/emque/producing/message/message.rb', line 23

def read_message_type
  @message_type
end

#read_topicObject



15
16
17
# File 'lib/emque/producing/message/message.rb', line 15

def read_topic
  @topic
end

#topic(name) ⇒ Object



11
12
13
# File 'lib/emque/producing/message/message.rb', line 11

def topic(name)
  @topic = name
end