Class: AgentXmpp::Response
Overview
Instance Attribute Summary (collapse)
-
- (Object) message
readonly
.........................................................................................................
-
- (Object) responds_with
readonly
.........................................................................................................
-
- (Object) text
readonly
.........................................................................................................
Instance Method Summary (collapse)
-
- (Response) initialize(msg, &blk)
constructor
.........................................................................................................
-
- (Object) method_missing(meth, *args, &blk)
.........................................................................................................
-
- (Object) to_s
.........................................................................................................
Constructor Details
- (Response) initialize(msg, &blk)
.........................................................................................................
16 17 18 19 20 |
# File 'lib/agent_xmpp/client/response.rb', line 16 def initialize(msg, &blk) @message = msg @text = msg.to_s @responds_with = blk end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(meth, *args, &blk)
.........................................................................................................
28 29 30 |
# File 'lib/agent_xmpp/client/response.rb', line 28 def method_missing(meth, *args, &blk) text.send(meth, *args, &blk) end |
Instance Attribute Details
- (Object) message (readonly)
.........................................................................................................
13 14 15 |
# File 'lib/agent_xmpp/client/response.rb', line 13 def @message end |
- (Object) responds_with (readonly)
.........................................................................................................
13 14 15 |
# File 'lib/agent_xmpp/client/response.rb', line 13 def responds_with @responds_with end |
- (Object) text (readonly)
.........................................................................................................
13 14 15 |
# File 'lib/agent_xmpp/client/response.rb', line 13 def text @text end |
Instance Method Details
- (Object) to_s
.........................................................................................................
23 24 25 |
# File 'lib/agent_xmpp/client/response.rb', line 23 def to_s text end |