Class: Jabber::Version::SimpleResponder

Class | Jabber::Version::SimpleResponder
In: | lib/xmpp4r/version/helper/simpleresponder.rb
Parent: | Responder

A class to answer version requests using IqQueryVersion

This is simplification as one doesn‘t need dynamic version answering normally.

Example usage:

     Jabber::Version::SimpleResponder.new(my_client, "My cool XMPP4R script", "1.0", "Younicks")

### Methods

new

### Attributes

name | [RW] |
os | [RW] |
version | [RW] |

### Public Class methods

new(stream, name, version, os=nil)

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

[Source]

        # File lib/xmpp4r/version/helper/simpleresponder.rb, line 31
    31:       def initialize(stream, name, version, os=nil)
    32:         super stream
    33:
    34:         @name = name
    35:         @version = version
    36:         @os = os
    37:
    38:         add_version_callback(180, self) { |iq,block|
    39:           block.call(@name, @version, @os)
    40:         }
    41:       end

[Validate]