PHP 8.2.31
Preview: 2.0.rb Size: 2.29 KB
//proc/thread-self/root/opt/alt/ruby19/lib64/ruby/1.9.1/rss/2.0.rb

require "rss/0.9"

module RSS

  class Rss

    class Channel

      [
        ["generator"],
        ["ttl", :integer],
      ].each do |name, type|
        install_text_element(name, "", "?", name, type)
      end

      [
        %w(category categories),
      ].each do |name, plural_name|
        install_have_children_element(name, "", "*", name, plural_name)
      end

      [
        ["image", "?"],
        ["language", "?"],
      ].each do |name, occurs|
        install_model(name, "", occurs)
      end

      Category = Item::Category

      class Item

        [
          ["comments", "?"],
          ["author", "?"],
        ].each do |name, occurs|
          install_text_element(name, "", occurs)
        end

        [
          ["pubDate", '?'],
        ].each do |name, occurs|
          install_date_element(name, "", occurs, name, 'rfc822')
        end
        alias date pubDate
        alias date= pubDate=

        [
          ["guid", '?'],
        ].each do |name, occurs|
          install_have_child_element(name, "", occurs)
        end

        private
        alias _setup_maker_element setup_maker_element
        def setup_maker_element(item)
          _setup_maker_element(item)
          @guid.setup_maker(item) if @guid
        end

        class Guid < Element

          include RSS09

          [
            ["isPermaLink", "", false, :boolean]
          ].each do |name, uri, required, type|
            install_get_attribute(name, uri, required, type)
          end

          content_setup

          def initialize(*args)
            if Utils.element_initialize_arguments?(args)
              super
            else
              super()
              self.isPermaLink = args[0]
              self.content = args[1]
            end
          end

          alias_method :_PermaLink?, :PermaLink?
          private :_PermaLink?
          def PermaLink?
            perma = _PermaLink?
            perma or perma.nil?
          end

          private
          def maker_target(item)
            item.guid
          end

          def setup_maker_attributes(guid)
            guid.isPermaLink = isPermaLink
            guid.content = content
          end
        end

      end

    end

  end

  RSS09::ELEMENTS.each do |name|
    BaseListener.install_get_text_element("", name, name)
  end

end

Directory Contents

Dirs: 3 × Files: 22

Name Size Perms Modified Actions
content DIR
- drwxr-xr-x 2024-03-03 22:48:05
Edit Download
- drwxr-xr-x 2024-03-03 22:48:05
Edit Download
maker DIR
- drwxr-xr-x 2024-03-03 22:48:05
Edit Download
9.36 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
8.46 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
2.29 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
18.95 KB lrw-r--r-- 2011-05-12 20:17:29
Edit Download
771 B lrw-r--r-- 2009-10-02 10:45:39
Edit Download
3.87 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
4.18 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
4.57 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
9.96 KB lrw-r--r-- 2007-11-16 01:30:29
Edit Download
1.12 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
15.47 KB lrw-r--r-- 2010-04-06 00:22:04
Edit Download
1.09 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
33.54 KB lrw-r--r-- 2011-05-19 00:07:25
Edit Download
1.22 KB lrw-r--r-- 2007-11-16 01:30:29
Edit Download
1.75 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
2.98 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
6.56 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
2.61 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
2.13 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
1.47 KB lrw-r--r-- 2007-11-16 01:30:29
Edit Download
1.55 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download
2.10 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).