Google

Class
Jabber::JID
In: jabber4r/jid.rb
Parent: Object

The Jabber ID class is used to hold a parsed jabber identifier (account+host+resource)

Methods

Attributes

 [RW]  :host

The host name (or IP address)

 [RW]  :node

The node (account)

 [RW]  :resource

The resource id

Public Class methods
to_jid(id) src
new(id) src

Constructs a JID from the supplied string of the format:


   node@host[/resource] (e.g. "rich_kilmer@jabber.com/laptop")

id:[String] The jabber id string to parse
Public Instance methods
==(other) src

Evalutes whether the node, resource and host are the same

other:[Jabber::JID] The other jabber id
return:[Boolean] True if they match
same_account?(other) src
strip_resource() src

Removes the resource from this JID

to_s() src

Returns the string ("node@host/resource") representation of this JID

return:[String] String form of JID
hash() src

Override hash to hash based on the to_s method