Class: IEgrip::Node
- Inherits:
-
GripWrapper
- Object
- GripWrapper
- IEgrip::Node
- Defined in:
- lib/iegrip.rb
Overview
Node
Direct Known Subclasses
Constant Summary collapse
- NODETYPE_DIC =
{ 1 => :ELEMENT_NODE, 2 => :ATTRIBUTE_NODE, 3 => :TEXT_NODE, 4 => :CDATA_SECTION_NODE, 5 => :ENTITY_REFERENCE_NODE, 6 => :ENTITY_NODE, 7 => :PROCESSING_INSTRUCTION_NODE, 8 => :COMMENT_NODE, 9 => :DOCUMENT_NODE, 10 => :DOCUMENT_TYPE_NODE, 11 => :DOCUMENT_FRAGMENT_NODE, 12 => :NOTATION_NODE, }
Instance Method Summary collapse
Methods inherited from GripWrapper
#initialize, #ole_methodNames, #raw
Constructor Details
This class inherits a constructor from IEgrip::GripWrapper
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IEgrip::GripWrapper
Instance Method Details
#inspect ⇒ Object
380 381 382 383 384 385 386 387 |
# File 'lib/iegrip.rb', line 380 def inspect case self.nodeType when 3 "<#{self.class}, Name:#{self.nodeName}, Text:#{self.wholeText.inspect}>" else "<#{self.class}, Name:#{self.nodeName}>" end end |
#nodeName ⇒ Object
367 368 369 |
# File 'lib/iegrip.rb', line 367 def nodeName @raw_object.nodeName end |
#nodeType ⇒ Object
371 372 373 |
# File 'lib/iegrip.rb', line 371 def nodeType @raw_object.nodetype end |
#nodeTypeName ⇒ Object
375 376 377 378 |
# File 'lib/iegrip.rb', line 375 def nodeTypeName nodetype = @raw_object.nodetype NODETYPE_DIC[nodetype] || :UNKNOWN end |