File: ns.rb

package info (click to toggle)
ruby-libxml 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,812 kB
  • sloc: xml: 9,628; ruby: 7,119; ansic: 6,665; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 556 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# encoding: UTF-8

module LibXML
  module XML
    class NS < Namespace # :nodoc: 
      def initialize(node, prefix, href)
        warn('The XML::NS class is deprecated.  Use XML::Namespace instead.')
        super(node, href, prefix)
      end

      def href?
        warn('XML::NS#href? is deprecated.  Use !XML::NS#href.nil? instead.')
        not self.href.nil?
      end

      def prefix?
        warn('XML::NS#prefix? is deprecated.  Use !XML::NS#prefix?.nil? instead.')
        not self.previx.nil?
      end
    end
  end
end