Module: MobyUtil::XML::Abstraction
- Defined in:
- lib/tdriver/util/xml/abstraction.rb
Instance Attribute Summary collapse
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
-
#attribute? ⇒ Boolean
TODO: document me.
-
#clone! ⇒ Object
TODO: document me.
-
#comment? ⇒ Boolean
TODO: document me.
-
#document? ⇒ Boolean
TODO: document me.
-
#element? ⇒ Boolean
TODO: document me.
-
#initialize(xml = nil, options = {}) ⇒ Object
TODO: document me.
-
#inspect ⇒ Object
print only object type and id hex.
-
#method_missing(*args) ⇒ Object
TODO: document me.
-
#nil? ⇒ Boolean
TODO: document me.
-
#nodeset? ⇒ Boolean
TODO: document me.
-
#text? ⇒ Boolean
TODO: document me.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
TODO: document me
97 98 99 100 101 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 97 def method_missing( *args ) raise RuntimeError, "This is abstraction class of #{ self.class } - XML parser type was not specified correctly" end |
Instance Attribute Details
#xml ⇒ Object
Returns the value of attribute xml.
26 27 28 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 26 def xml @xml end |
Instance Method Details
#attribute? ⇒ Boolean
TODO: document me
62 63 64 65 66 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 62 def attribute? kind_of?( MobyUtil::XML::Attribute ) end |
#clone! ⇒ Object
TODO: document me
40 41 42 43 44 45 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 40 def clone! # create a clone of self object, also xml object is cloned; note that all references (e.g. parent) will be disconnected self.class.new( @xml.clone ) end |
#comment? ⇒ Boolean
TODO: document me
48 49 50 51 52 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 48 def comment? kind_of?( MobyUtil::XML::Comment ) end |
#document? ⇒ Boolean
TODO: document me
83 84 85 86 87 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 83 def document? kind_of?( MobyUtil::XML::Document ) end |
#element? ⇒ Boolean
TODO: document me
76 77 78 79 80 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 76 def element? kind_of?( MobyUtil::XML::Element ) end |
#initialize(xml = nil, options = {}) ⇒ Object
TODO: document me
29 30 31 32 33 34 35 36 37 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 29 def initialize( xml = nil, = {} ) @options = @cache = Hash.new{ | hash, key | hash[ key ] = {} } @xml = xml end |
#inspect ⇒ Object
print only object type and id hex
104 105 106 107 108 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 104 def inspect "#<#{ self.class }:0x#{ ( "%x" % ( object_id.to_i << 1 ) )[ 3 .. -1 ] }>" end |
#nil? ⇒ Boolean
TODO: document me
90 91 92 93 94 |
# File 'lib/tdriver/util/xml/abstraction.rb', line 90 def nil? kind_of?( MobyUtil::XML::NilNode ) end |