Class: NameSpaceVisitor
- Inherits:
-
NodeVisitor
- Object
- NodeVisitor
- NameSpaceVisitor
- Defined in:
- lib/xml_command_handlers/models/name_space_visitor.rb
Instance Method Summary collapse
-
#initialize(name_space_name) ⇒ NameSpaceVisitor
constructor
A new instance of NameSpaceVisitor.
- #process_after_children(node) ⇒ Object
- #process_before_children(node) ⇒ Object
Constructor Details
#initialize(name_space_name) ⇒ NameSpaceVisitor
Returns a new instance of NameSpaceVisitor.
5 6 7 |
# File 'lib/xml_command_handlers/models/name_space_visitor.rb', line 5 def initialize(name_space_name) @name_space_name = name_space_name end |
Instance Method Details
#process_after_children(node) ⇒ Object
14 15 16 |
# File 'lib/xml_command_handlers/models/name_space_visitor.rb', line 14 def process_after_children(node) #NOOP end |
#process_before_children(node) ⇒ Object
9 10 11 12 |
# File 'lib/xml_command_handlers/models/name_space_visitor.rb', line 9 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 |