Class: BlabberMouth::Adapters::XmppMsgContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/blabber_mouth/adapters/xmpp_msg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeXmppMsgContainer

Returns a new instance of XmppMsgContainer.



7
8
9
10
# File 'lib/blabber_mouth/adapters/xmpp_msg.rb', line 7

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

Instance Attribute Details

#messagesObject

Returns the value of attribute messages.



5
6
7
# File 'lib/blabber_mouth/adapters/xmpp_msg.rb', line 5

def messages
  @messages
end

#recipientsObject

Returns the value of attribute recipients.



6
7
8
# File 'lib/blabber_mouth/adapters/xmpp_msg.rb', line 6

def recipients
  @recipients
end

Instance Method Details

#find_message_by_recipient(rcpt) ⇒ Object



12
13
14
# File 'lib/blabber_mouth/adapters/xmpp_msg.rb', line 12

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