Class: AgentXmpp::Xmpp::Message
- Includes:
- XParent
- Defined in:
- lib/agent_xmpp/xmpp/message.rb
Overview
Class Method Summary collapse
-
.chat(to, body) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
Instance Method Summary collapse
-
#body ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#body=(b) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#initialize(to = nil, body = nil) ⇒ Message
constructor
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#subject ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#subject=(s) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#thread ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#thread=(s) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#type ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
Methods included from XParent
Methods inherited from Stanza
answer, #answer, #error, #from, #from=, #id, #id=, #normalize, #to, #to=, #type=
Methods inherited from Element
#<<, class_for_name_xmlns, #clone, import, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=, xmpp_attribute, xmpp_child
Methods inherited from REXML::Element
#delete_elements, #first_element, #first_element_text, #import, import, #replace_element_text, #typed_add
Constructor Details
Class Method Details
Instance Method Details
#body ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
45 46 47 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 45 def body first_element_text('body') end |
#body=(b) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
50 51 52 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 50 def body=(b) replace_element_text('body', b) end |
#subject ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
60 61 62 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 60 def subject first_element_text('subject') end |
#subject=(s) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
55 56 57 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 55 def subject=(s) replace_element_text('subject', s) end |
#thread ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
71 72 73 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 71 def thread first_element_text('thread') end |
#thread=(s) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
65 66 67 68 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 65 def thread=(s) delete_elements('thread') replace_element_text('thread', s) if s end |
#type ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
39 40 41 42 |
# File 'lib/agent_xmpp/xmpp/message.rb', line 39 def type stanza_type = attributes['type'] stanza_type.nil? ? :normal : stanza_type.to_sym end |