Class: Glimmer::XML::NameSpaceVisitor

Inherits:
NodeVisitor show all
Defined in:
lib/glimmer/xml/name_space_visitor.rb

Instance Method Summary collapse

Constructor Details

#initialize(name_space_name) ⇒ NameSpaceVisitor

Returns a new instance of NameSpaceVisitor.



28
29
30
# File 'lib/glimmer/xml/name_space_visitor.rb', line 28

def initialize(name_space_name)
  @name_space_name = name_space_name
end

Instance Method Details

#process_after_children(node) ⇒ Object



37
38
39
# File 'lib/glimmer/xml/name_space_visitor.rb', line 37

def process_after_children(node)
  #NOOP
end

#process_before_children(node) ⇒ Object



32
33
34
35
# File 'lib/glimmer/xml/name_space_visitor.rb', line 32

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