Class: MobyUtil::XML::Builder

Inherits:
Object
  • Object
show all
Includes:
Abstraction
Defined in:
lib/tdriver/util/xml/builder.rb

Instance Attribute Summary

Attributes included from Abstraction

#xml

Instance Method Summary collapse

Methods included from Abstraction

#attribute?, #clone!, #comment?, #document?, #element?, #inspect, #method_missing, #nil?, #nodeset?, #text?

Constructor Details

#initialize(&block) ⇒ Builder

Returns a new instance of Builder.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/tdriver/util/xml/builder.rb', line 28

def initialize( &block )

  if block_given?

    file, line = caller.first.split( ":" )

    $stderr.puts "#{ file }:#{ line } warning: deprecated method #{ self.class }#new, use MobyUtil::XML#build instead"

    # extend builder behaviour of current parser
    extend( ( ::MobyUtil::XML.current_parser )::Builder )

    # create builder object
    build( &block )

  end

end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MobyUtil::XML::Abstraction