Class: Skype::Chat
- Inherits:
-
Object
- Object
- Skype::Chat
- Defined in:
- lib/skype/wrappers/chat.rb
Defined Under Namespace
Classes: Message
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#members ⇒ Object
readonly
Returns the value of attribute members.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
-
#initialize(id) ⇒ Chat
constructor
A new instance of Chat.
- #messages ⇒ Object
- #post(message) ⇒ Object
Constructor Details
#initialize(id) ⇒ Chat
Returns a new instance of Chat.
16 17 18 19 20 |
# File 'lib/skype/wrappers/chat.rb', line 16 def initialize(id) @id = id @topic = ::Skype.exec("GET CHAT #{@id} TOPIC").scan(/TOPIC (.*)$/)[0][0].toutf8 rescue @topic = "" @members = ::Skype.exec("GET CHAT #{@id} MEMBERS").scan(/MEMBERS (.+)$/)[0][0].split(/\s/) rescue @members = [] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/skype/wrappers/chat.rb', line 14 def id @id end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
14 15 16 |
# File 'lib/skype/wrappers/chat.rb', line 14 def members @members end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
14 15 16 |
# File 'lib/skype/wrappers/chat.rb', line 14 def topic @topic end |