Class: Uppercut::Message
- Inherits:
-
Object
- Object
- Uppercut::Message
- Defined in:
- lib/uppercut/message.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(base) ⇒ Message
constructor
:nodoc:.
-
#send(body = nil) ⇒ Object
Send a blob of text.
Constructor Details
#initialize(base) ⇒ Message
:nodoc:
5 6 7 |
# File 'lib/uppercut/message.rb', line 5 def initialize(base) #:nodoc: @base = base end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/uppercut/message.rb', line 3 def end |
#to ⇒ Object
Returns the value of attribute to.
3 4 5 |
# File 'lib/uppercut/message.rb', line 3 def to @to end |
Instance Method Details
#send(body = nil) ⇒ Object
Send a blob of text.
10 11 12 13 14 15 |
# File 'lib/uppercut/message.rb', line 10 def send(body=nil) msg = Jabber::Message.new(@to) msg.type = :chat msg.body = body || @base.stanza(msg) end |