Class: Jabber::Version::SimpleResponder
- Defined in:
- lib/vendor/xmpp4r/lib/xmpp4r/version/helper/simpleresponder.rb
Overview
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#os ⇒ Object
Returns the value of attribute os.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(stream, name, version, os = nil) ⇒ SimpleResponder
constructor
Initialize a new version responder.
Methods inherited from Responder
#add_version_callback, #iq_callback
Constructor Details
#initialize(stream, name, version, os = nil) ⇒ SimpleResponder
Initialize a new version responder
Registers it’s callback (prio = 180, ref = self)
- stream
- Stream
-
Where to register callback handlers
- name
- String
-
Software name for answers
- version
- String
-
Software versio for answers
- os
- String
-
Optional operating system name for answers
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/version/helper/simpleresponder.rb', line 31 def initialize(stream, name, version, os=nil) super stream @name = name @version = version @os = os add_version_callback(180, self) { |iq,block| block.call(@name, @version, @os) } end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/version/helper/simpleresponder.rb', line 19 def name @name end |
#os ⇒ Object
Returns the value of attribute os.
21 22 23 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/version/helper/simpleresponder.rb', line 21 def os @os end |
#version ⇒ Object
Returns the value of attribute version.
20 21 22 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/version/helper/simpleresponder.rb', line 20 def version @version end |