|
Class Jabber::Roster::RosterItem |
|
The RosterItem class embodies another Jabber user's status (from the local user's perspective). RosterItems contain Jabber::Roster::RosterItem::Resource objects for each resource location a foreign user is accessing through.
| Methods |
| Attributes |
| [RW] | :group | The group name for this account |
| [RW] | :jid | The Jabber ID (Jabber::JID) |
| [RW] | :name | The (nick)name of this account |
| [R] | :roster | The Jabber::Roster instance |
| [RW] | :subscription | The subscription type |
| Classes and Modules |
| Public Class methods |
| new(roster, jid, subscription, name, group=nil) src |
Constructs a RosterItem
| roster: | [Jabber::Roster] The roster instance |
| subscription: | [String] The subscription type |
| name: | [String] The (nick)name |
| group: | [String=nil] The group this account belongs to |
| Public Instance methods |
| get_vcard() src |
Retrieves the VCard for this (RosterItem) account. This method blocks until the the vcard is returned.
| return: | [Jabber::VCard] The VCard object for this account |
| add(resourceName, show, status) src |
Adds a new resource to the Roster item and notifies listeners
| resourceName: | [String] The name of the resource |
| show: | [String] How the resource is to be viewed |
| status: | [String] The status message |
| return: | [Jabber::Roster:RosterItem::Resource] The new Resource instance |
| delete(resourceName) src |
Deletes a resource from this roster item and notifies listeners
| resourceName: | [String] The name of the resource |
| return: | [Jabber::Roster:RosterItem::Resource] The deleted Resource |
| [](resourceName) src |
Retrieves a resource object
| resourceName: | [String] The name of the resource |
| return: | [Jabber::Roster:RosterItem::Resource] The Resource instance |
| each_resource() {|resource}| ...} src |
Iterates over the list of available resources
| yield: | |Jabber::Roster:RosterItem::Resource| The resource instance |
| to_s() src |
Dumps the roster item
| return: | [String] The roster item dumped as a String |