Sha256: 880465992135c2de90d55a6ef4489857fea9fbdf24e519f51d26ac29ba38ca64

Contents?: true

Size: 1.15 KB

Versions: 33

Compression:

Stored size: 1.15 KB

Contents

# =XMPP4R - XMPP Library for Ruby
# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option.
# Website::http://home.gna.org/xmpp4r/

module Jabber
  module MUC
    class XMUCUserInvite < XMPPElement
      name_xmlns 'invite', 'http://jabber.org/protocol/muc#user'

      def initialize(to=nil, reason=nil)
        super()
        set_to(to)
        set_reason(reason)
      end

      def to
        attributes['to'].nil? ? nil : JID.new(attributes['to'])
      end

      def to=(j)
        attributes['to'] = j.nil? ? nil : j.to_s
      end

      def set_to(j)
        self.to = j
        self
      end

      def from
        attributes['from'].nil? ? nil : JID.new(attributes['from'])
      end

      def from=(j)
        attributes['from'] = (j.nil? ? nil : j.to_s)
      end

      def set_from(j)
        self.from = j
        self
      end

      def reason
        first_element_text('reason')
      end

      def reason=(s)
        if s
          replace_element_text('reason', s)
        else
          delete_elements('reason')
        end
      end

      def set_reason(s)
        self.reason = s
        self
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 13 rubygems

Version Path
brontes3d-xmpp4r-0.4 lib/xmpp4r/muc/x/mucuserinvite.rb
bryanl-xmpp4r-0.3.2 lib/xmpp4r/muc/x/mucuserinvite.rb
edavey-xmpp4r-0.4.1 lib/xmpp4r/muc/x/mucuserinvite.rb
edavey-xmpp4r-0.4.2 lib/xmpp4r/muc/x/mucuserinvite.rb
edavey-xmpp4r-0.4 lib/xmpp4r/muc/x/mucuserinvite.rb
heipei-xmpp4r-0.3.2 lib/xmpp4r/muc/x/mucuserinvite.rb
ln-xmpp4r-0.5 lib/xmpp4r/muc/x/mucuserinvite.rb
mojodna-xmpp4r-0.4.0.2 lib/xmpp4r/muc/x/mucuserinvite.rb
mojodna-xmpp4r-0.4.0.3 lib/xmpp4r/muc/x/mucuserinvite.rb
seanohalpin-xmpp4r-0.4.1 lib/xmpp4r/muc/x/mucuserinvite.rb
xmpp4r-0.5.5 lib/xmpp4r/muc/x/mucuserinvite.rb
gmcmillan-xmpp4r-0.6.2 lib/xmpp4r/muc/x/mucuserinvite.rb
gmcmillan-xmpp4r-0.6.1 lib/xmpp4r/muc/x/mucuserinvite.rb
gmcmillan-xmpp4r-0.6 lib/xmpp4r/muc/x/mucuserinvite.rb
gmcmillan-xmpp4r-0.5 lib/xmpp4r/muc/x/mucuserinvite.rb
mad-p-xmpp4r-0.6.3 lib/xmpp4r/muc/x/mucuserinvite.rb
mad-p-xmpp4r-0.6.2 lib/xmpp4r/muc/x/mucuserinvite.rb
mad-p-xmpp4r-0.6.1 lib/xmpp4r/muc/x/mucuserinvite.rb
mad-p-xmpp4r-0.6.0 lib/xmpp4r/muc/x/mucuserinvite.rb
cerberus-0.8.0 lib/vendor/xmpp4r/lib/xmpp4r/muc/x/mucuserinvite.rb