Class: Blather::Stanza::Disco

Inherits:
Iq::Query show all
Defined in:
lib/blather/stanza/disco.rb

Overview

# Disco Base class

Use Blather::Stanza::DiscoInfo or Blather::Stanza::DiscoItems

Direct Known Subclasses

DiscoInfo, DiscoItems

Constant Summary

Constants inherited from Iq

Iq::VALID_TYPES

Constants inherited from XMPPNode

XMPPNode::BASE_NAMES

Instance Attribute Summary

Attributes inherited from Blather::Stanza

#handler_hierarchy

Instance Method Summary collapse

Methods inherited from Iq::Query

#inherit, new, #query

Methods inherited from Iq

#error?, #get?, import, new, #reply!, #result?, #set?, #type=

Methods inherited from Blather::Stanza

#as_error, #error?, #from, #from=, handler_list, #id, #id=, #initialize, next_id, register, #reply, #reply!, #to, #to=, #type, #type=

Methods inherited from XMPPNode

class_from_registration, #decorate, decorator_modules, import, new, parse, register, #to_stanza

Constructor Details

This class inherits a constructor from Blather::Stanza

Instance Method Details

#eql?(o, *fields) ⇒ true, false

Compare two Disco objects by name, type and category

Parameters:

  • o (Disco)

    the Identity object to compare against

Returns:

  • (true, false)


26
27
28
# File 'lib/blather/stanza/disco.rb', line 26

def eql?(o, *fields)
  super o, *(fields + [:node])
end

#nodeString

Get the name of the node

Returns:

  • (String)

    the node name



12
13
14
# File 'lib/blather/stanza/disco.rb', line 12

def node
  query[:node]
end

#node=(node) ⇒ Object

Set the name of the node

Parameters:

  • node (#to_s)

    the new node name



19
20
21
# File 'lib/blather/stanza/disco.rb', line 19

def node=(node)
  query[:node] = node
end