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.



7
8
9
# File 'lib/glimmer/xml/name_space_visitor.rb', line 7

def initialize(name_space_name)
  @name_space_name = name_space_name
end

Instance Method Details

#process_after_children(node) ⇒ Object



16
17
18
# File 'lib/glimmer/xml/name_space_visitor.rb', line 16

def process_after_children(node)
  #NOOP
end

#process_before_children(node) ⇒ Object



11
12
13
14
# File 'lib/glimmer/xml/name_space_visitor.rb', line 11

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