class Jabber::MUC::HipChat::UserData
Public Class Methods
get_users_data(stream)
click to toggle source
# File lib/xmpp4r/muc/hipchat/user_data.rb, line 29 def get_users_data stream @stream ||= stream @roster ||= Roster::Helper.new(stream, false) # TODO: Error handling loop do rosterget = Iq.new_rosterget rosterget.id = "roster_1" @stream.send(rosterget) @roster.wait_for_roster break if @roster.items.any? sleep(2) end @roster.items.map do |_, item| self.new(item) end end
new(user)
click to toggle source
# File lib/xmpp4r/muc/hipchat/user_data.rb, line 5 def initialize user @user = user end
Public Instance Methods
attributes()
click to toggle source
# File lib/xmpp4r/muc/hipchat/user_data.rb, line 21 def attributes { name: name, mention: mention, } end
id()
click to toggle source
# File lib/xmpp4r/muc/hipchat/user_data.rb, line 9 def id @user.jid.node end
mention()
click to toggle source
# File lib/xmpp4r/muc/hipchat/user_data.rb, line 17 def mention @user.attributes['mention_name'] end
name()
click to toggle source
# File lib/xmpp4r/muc/hipchat/user_data.rb, line 13 def name @user.iname end