Class: Jabber::MUC::XMUCUserInvite
Instance Method Summary
collapse
Methods inherited from XMPPElement
class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=
#==, #delete_elements, #each_elements, #first_element, #first_element_content, #first_element_text, #import, import, #replace_element_content, #replace_element_text, #typed_add
Constructor Details
#initialize(to = nil, reason = nil) ⇒ XMUCUserInvite
Returns a new instance of XMUCUserInvite.
10
11
12
13
14
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 10
def initialize(to=nil, reason=nil)
super()
set_to(to)
set_reason(reason)
end
|
Instance Method Details
#from ⇒ Object
29
30
31
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 29
def from
attributes['from'].nil? ? nil : JID.new(attributes['from'])
end
|
#from=(j) ⇒ Object
33
34
35
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 33
def from=(j)
attributes['from'] = (j.nil? ? nil : j.to_s)
end
|
#reason ⇒ Object
42
43
44
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 42
def reason
first_element_text('reason')
end
|
#reason=(s) ⇒ Object
46
47
48
49
50
51
52
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 46
def reason=(s)
if s
replace_element_text('reason', s)
else
delete_elements('reason')
end
end
|
#set_from(j) ⇒ Object
37
38
39
40
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 37
def set_from(j)
self.from = j
self
end
|
#set_reason(s) ⇒ Object
54
55
56
57
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 54
def set_reason(s)
self.reason = s
self
end
|
#set_to(j) ⇒ Object
24
25
26
27
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 24
def set_to(j)
self.to = j
self
end
|
#to ⇒ Object
16
17
18
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 16
def to
attributes['to'].nil? ? nil : JID.new(attributes['to'])
end
|
#to=(j) ⇒ Object
20
21
22
|
# File 'lib/xmpp4r/muc/x/mucuserinvite.rb', line 20
def to=(j)
attributes['to'] = j.nil? ? nil : j.to_s
end
|