Class: Jabber::MUC::XMUCUserInvite
- Inherits:
-
XMPPElement
show all
- Defined in:
- lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb
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, #first_element, #first_element_text, #import, import, #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/gems/xmpp4r-0.4/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
29
30
31
|
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb', line 29
def from
attributes['from'].nil? ? nil : JID.new(attributes['from'])
end
|
33
34
35
|
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb', line 33
def from=(j)
attributes['from'] = (j.nil? ? nil : j.to_s)
end
|
42
43
44
|
# File 'lib/gems/xmpp4r-0.4/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/gems/xmpp4r-0.4/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/gems/xmpp4r-0.4/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/gems/xmpp4r-0.4/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/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb', line 24
def set_to(j)
self.to = j
self
end
|
16
17
18
|
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb', line 16
def to
attributes['to'].nil? ? nil : JID.new(attributes['to'])
end
|
20
21
22
|
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/muc/x/mucuserinvite.rb', line 20
def to=(j)
attributes['to'] = j.nil? ? nil : j.to_s
end
|