Class: Blather::Stanza
- Defined in:
- lib/adhearsion/core_ext/blather/stanza.rb,
lib/adhearsion/core_ext/blather/stanza/presence.rb
Defined Under Namespace
Classes: Presence
Constant Summary collapse
- RAYO_NODE_PATH =
"(#{Adhearsion::Rayo::RAYO_NAMESPACES.keys.map { |k| "#{k}:*" }.join("|")})".freeze
Instance Method Summary collapse
-
#call_id ⇒ String
The call ID this stanza applies to.
-
#component_id ⇒ String
The command ID this stanza applies to.
-
#rayo_node ⇒ Adhearsion::Rayo::RayoNode
A child of RayoNode representing the Rayo command/event contained within the stanza.
Instance Method Details
#call_id ⇒ String
Returns the call ID this stanza applies to.
22 23 24 |
# File 'lib/adhearsion/core_ext/blather/stanza.rb', line 22 def call_id from.node end |
#component_id ⇒ String
Returns the command ID this stanza applies to.
29 30 31 |
# File 'lib/adhearsion/core_ext/blather/stanza.rb', line 29 def component_id from.resource end |
#rayo_node ⇒ Adhearsion::Rayo::RayoNode
Returns a child of RayoNode representing the Rayo command/event contained within the stanza.
12 13 14 15 16 17 |
# File 'lib/adhearsion/core_ext/blather/stanza.rb', line 12 def rayo_node @rayo_node ||= begin first_child = at_xpath RAYO_NODE_PATH, Adhearsion::Rayo::RAYO_NAMESPACES Adhearsion::Rayo::RayoNode.from_xml first_child, nil, component_id, "xmpp:#{from}", if first_child end end |