Sha256: ef234771d439c48de591a9c2d9baaa800cbb7f1b1f89ee5abb7420ef212948f3

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 Bytes

Contents

require "glimmer/xml/node_visitor"

module Glimmer
  module XML
    class NameSpaceVisitor < NodeVisitor

      def initialize(name_space_name)
        @name_space_name = name_space_name
      end

      def process_before_children(node)
        return if node.is_a?(String)
        node.name_space = Node.new(nil, @name_space_name, nil) if node and !node.name_space
      end

      def process_after_children(node)
        #NOOP
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
glimmer-dsl-xml-0.2.0 lib/glimmer/xml/name_space_visitor.rb
glimmer-dsl-xml-0.1.0 lib/glimmer/xml/name_space_visitor.rb
glimmer-dsl-css-0.1.0 lib/glimmer/xml/name_space_visitor.rb