class Blather::Roster
Public Instance Methods
push(elem, send = true, groups = ["Buddies"])
click to toggle source
# File lib/gxg/net_clients.rb, line 27 def push(elem, send = true, groups = ["Buddies"]) jid = elem.respond_to?(:jid) && elem.jid ? elem.jid : JID.new(elem) @items[key(jid)] = node = RosterItem.new(elem) @items[key(jid)].subscription = :both @items[key(jid)].groups = groups @stream.write(node.to_stanza(:set)) if send end
Also aliased as: add