Module: Blather::Stanza::Presence::MUCUser::InstanceMethods
- Included in:
- Blather::Stanza::Presence::MUCUser
- Defined in:
- lib/blather/stanza/presence/muc_user.rb
Instance Method Summary collapse
- #affiliation ⇒ Object
- #affiliation=(val) ⇒ Object
- #item ⇒ Object
- #jid ⇒ Object
- #jid=(val) ⇒ Object
- #role ⇒ Object
- #role=(val) ⇒ Object
- #status ⇒ Object
- #status_codes ⇒ Object
- #status_codes=(val) ⇒ Object
Instance Method Details
#affiliation ⇒ Object
18 19 20 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 18 def affiliation item.affiliation end |
#affiliation=(val) ⇒ Object
22 23 24 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 22 def affiliation=(val) item.affiliation = val end |
#item ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 53 def item if item = muc_user.find_first('ns:item', :ns => MUCUser.registered_ns) Item.new item else muc_user << (item = Item.new nil, nil, nil, self.document) item end end |
#jid ⇒ Object
34 35 36 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 34 def jid item.jid end |
#jid=(val) ⇒ Object
38 39 40 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 38 def jid=(val) item.jid = val end |
#role ⇒ Object
26 27 28 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 26 def role item.role end |
#role=(val) ⇒ Object
30 31 32 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 30 def role=(val) item.role = val end |
#status ⇒ Object
62 63 64 65 66 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 62 def status muc_user.find('ns:status', :ns => MUCUser.registered_ns).map do |status| Status.new status end end |
#status_codes ⇒ Object
42 43 44 |
# File 'lib/blather/stanza/presence/muc_user.rb', line 42 def status_codes status.map &:code end |