Class RSS::Element
In: rss/rss.rb
Parent: Object

Methods

Included Modules

Utils

Constants

INDENT = " "

Attributes

do_validate  [RW] 

Public Class methods

[Source]

# File rss/rss.rb, line 434
      def indent_size
        @indent_size
      end

[Source]

# File rss/rss.rb, line 336
      def inherited(klass)
        klass.module_eval("public\n\n@tag_name = name.split(/::/).last.downcase\n@indent_size = name.split(/::/).size - 2\n\n@@must_call_validators = {}\n\ndef self.must_call_validators\n@@must_call_validators\nend\n\ndef self.install_must_call_validator(prefix, uri)\n@@must_call_validators[uri] = prefix\nend\n\n@@model = []\n\ndef self.model\n@@model\nend\n\ndef self.install_model(tag, occurs=nil)\nif m = @@model.find {|t, o| t == tag}\nm[1] = occurs\nelse\n@@model << [tag, occurs]\nend\nend\n\n@@get_attributes = []\n\ndef self.get_attributes()\n@@get_attributes\nend\n\ndef self.install_get_attribute(name, uri, required=true)\nattr_writer name\nconvert_attr_reader name\n@@get_attributes << [name, uri, required]\nend\n\n@@have_content = false\n\ndef self.content_setup\nattr_writer :content\nconvert_attr_reader :content\n@@have_content = true\nend\n\ndef self.have_content?\n@@have_content\nend\n\n@@have_children_elements = []\n\ndef self.have_children_elements\n@@have_children_elements\nend\n\ndef self.add_have_children_element(variable_name)\n@@have_children_elements << variable_name\nend\n\n@@need_initialize_variables = []\n\ndef self.add_need_initialize_variable(variable_name)\n@@need_initialize_variables << variable_name\nend\n\ndef self.need_initialize_variables\n@@need_initialize_variables\nend\n\n")
      end

[Source]

# File rss/rss.rb, line 423
      def install_ns(prefix, uri)
        if self::NSPOOL.has_key?(prefix)
          raise OverlappedPrefixError.new(prefix)
        end
        self::NSPOOL[prefix] = uri
      end

[Source]

# File rss/rss.rb, line 442
    def initialize(do_validate=true)
      @converter = nil
      @do_validate = do_validate
      initialize_variables
    end

[Source]

# File rss/rss.rb, line 415
      def required_prefix
        nil
      end

[Source]

# File rss/rss.rb, line 419
      def required_uri
        nil
      end

[Source]

# File rss/rss.rb, line 430
      def tag_name
        @tag_name
      end

Public Instance methods

[Source]

# File rss/rss.rb, line 452
    def converter=(converter)
      @converter = converter
      children.each do |child|
        child.converter = converter unless child.nil?
      end
    end

[Source]

# File rss/rss.rb, line 448
    def tag_name
      self.class.tag_name
    end

[Source]

# File rss/rss.rb, line 459
    def validate
      validate_attribute
      __validate
    end

[Source]

# File rss/rss.rb, line 464
    def validate_for_stream(tags)
      validate_attribute
      __validate(tags, false)
    end

[Validate]