Sha256: 26fb39cc30d549affe513fe1205c876ee14d450d8e20396676f767a9dce3abca
Contents?: true
Size: 532 Bytes
Versions: 13
Compression:
Stored size: 532 Bytes
Contents
class IqQueryStanza def initialize(params = {}) @doc = Nokogiri::XML::Document.new @iq = Nokogiri::XML::Node.new("iq", @doc) @iq["type"] = params[:type].to_s @iq["to"] = Superfeedr.conf[:superfeedr_jid] @iq["id"] = "#{random_iq_id}" @iq["from"] = params[:from] if params[:from] end def type @iq["type"] end def to @iq["to"] end def from @iq["from"] end def id @iq["id"] end def random_iq_id rand(1000) end def to_s @iq.to_s end end
Version data entries
13 entries across 13 versions & 3 rubygems