Class: Skype::ChatMember

Inherits:
AbstractObject show all
Defined in:
lib/skype/chatmember.rb

Constant Summary collapse

OBJECT_NAME =
"CHATMEMBER"

Instance Attribute Summary

Attributes included from AbstractObject::Get

#property2callback, #property2symbol

Instance Method Summary collapse

Methods inherited from AbstractObject

inherited, #initialize, new, notified, #to_s

Methods included from AbstractObject::Notify

#delNotify, #notified, #notify, #setNotify

Methods included from AbstractObject::Get

#def_parser, #notice

Methods included from AbstractObject::Invokers

#invoke_alter, #invoke_echo, #invoke_get, #invoke_one, #invoke_set

Constructor Details

This class inherits a constructor from Skype::AbstractObject

Instance Method Details

#can_set_role_to?(role) ⇒ Boolean Also known as: canSetRoleTo?

Returns:

  • (Boolean)


25
26
27
28
# File 'lib/skype/chatmember.rb', line 25

def can_set_role_to?(role)
  invoke("ALTER CHATMEMBER #{@id} CANSETROLETO #{role}") =~ /ALTER CHATMEMBER CANSETROLETO (TRUE|FALSE)/
  $1 == 'TRUE' ? true : false
end

#get_chatObject Also known as: getChat



5
# File 'lib/skype/chatmember.rb', line 5

def get_chat() parse :chat, invoke_get('CHATNAME') end

#get_is_active?Boolean Also known as: getIsActive?

Returns:

  • (Boolean)


17
# File 'lib/skype/chatmember.rb', line 17

def get_is_active?() parse :is_active, invoke_get('IS_ACTIVE') end

#get_roleObject Also known as: getRole



13
# File 'lib/skype/chatmember.rb', line 13

def get_role() invoke_get('ROLE') end

#get_userObject Also known as: getUser



9
# File 'lib/skype/chatmember.rb', line 9

def get_user() parse :user, invoke_get('IDENTITY') end

#set_role_to(role) ⇒ Object Also known as: setRoleTo



22
# File 'lib/skype/chatmember.rb', line 22

def set_role_to(role) invoke_alter('SETROLETO', role) end