Class: Mack::Notifier::Adapters::XmppMsgContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/mack-notifier/adapters/xmpp_msg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeXmppMsgContainer

Returns a new instance of XmppMsgContainer.



8
9
10
11
# File 'lib/mack-notifier/adapters/xmpp_msg.rb', line 8

def initialize
  self.messages = []
  self.recipients = []
end

Instance Attribute Details

#messagesObject

Returns the value of attribute messages.



6
7
8
# File 'lib/mack-notifier/adapters/xmpp_msg.rb', line 6

def messages
  @messages
end

#recipientsObject

Returns the value of attribute recipients.



7
8
9
# File 'lib/mack-notifier/adapters/xmpp_msg.rb', line 7

def recipients
  @recipients
end

Instance Method Details

#find_message_by_recipient(rcpt) ⇒ Object



13
14
15
# File 'lib/mack-notifier/adapters/xmpp_msg.rb', line 13

def find_message_by_recipient(rcpt)
  self.messages.find { |x| x.to.to_s == rcpt.to_s }
end