Class: Skype::Chatmessage

Inherits:
Object
  • Object
show all
Defined in:
lib/skype/chatmessage.rb

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Chatmessage

Returns a new instance of Chatmessage.



3
4
5
# File 'lib/skype/chatmessage.rb', line 3

def initialize(id)
  @chatmessage_id = id
end

Instance Method Details

#body(&block) ⇒ Object



14
15
16
17
# File 'lib/skype/chatmessage.rb', line 14

def body(&block)
  return unless block_given?
  get_property("BODY", &block)
end

#chat(&block) ⇒ Object



7
8
9
10
11
12
# File 'lib/skype/chatmessage.rb', line 7

def chat(&block)
  return unless block_given?
  get_property("CHATNAME") do |chatname|
    block.call(Chat.new(chatname))
  end
end

#from(&block) ⇒ Object



19
20
21
22
# File 'lib/skype/chatmessage.rb', line 19

def from(&block)
  return unless block_given?
  get_property("FROM_HANDLE", &block)
end

#from_name(&block) ⇒ Object



24
25
26
27
# File 'lib/skype/chatmessage.rb', line 24

def from_name(&block)
  return unless block_given?
  get_property("FROM_DISPNAME", &block)
end