Class: AgentXmpp::Response
Overview
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
#responds_with ⇒ Object
readonly
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
#text ⇒ Object
readonly
.….….….….….….….….….….….….….….….….….….….….….….….….….….
Instance Method Summary collapse
-
#initialize(msg, &blk) ⇒ Response
constructor
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
#method_missing(meth, *args, &blk) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
#to_s ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
Constructor Details
#initialize(msg, &blk) ⇒ Response
.….….….….….….….….….….….….….….….….….….….….….….….….….….
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
#method_missing(meth, *args, &blk) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
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
#message ⇒ Object (readonly)
.….….….….….….….….….….….….….….….….….….….….….….….….….….
13 14 15 |
# File 'lib/agent_xmpp/client/response.rb', line 13 def @message end |
#responds_with ⇒ Object (readonly)
.….….….….….….….….….….….….….….….….….….….….….….….….….….
13 14 15 |
# File 'lib/agent_xmpp/client/response.rb', line 13 def responds_with @responds_with end |
#text ⇒ Object (readonly)
.….….….….….….….….….….….….….….….….….….….….….….….….….….
13 14 15 |
# File 'lib/agent_xmpp/client/response.rb', line 13 def text @text end |
Instance Method Details
#to_s ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
23 24 25 |
# File 'lib/agent_xmpp/client/response.rb', line 23 def to_s text end |