Class: Rype::Chatmessage
- Inherits:
-
Object
- Object
- Rype::Chatmessage
- Defined in:
- lib/rype/chatmessage.rb
Instance Method Summary collapse
- #body(&block) ⇒ Object
- #chat(&block) ⇒ Object
- #from(&block) ⇒ Object
- #from_name(&block) ⇒ Object
-
#initialize(id) ⇒ Chatmessage
constructor
A new instance of Chatmessage.
Constructor Details
#initialize(id) ⇒ Chatmessage
Returns a new instance of Chatmessage.
3 4 5 |
# File 'lib/rype/chatmessage.rb', line 3 def initialize(id) @chatmessage_id = id end |
Instance Method Details
#body(&block) ⇒ Object
14 15 16 17 |
# File 'lib/rype/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/rype/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/rype/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/rype/chatmessage.rb', line 24 def from_name(&block) return unless block_given? get_property("FROM_DISPNAME", &block) end |