Class: OAS::AdXML::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/oas/adxml.rb

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ Request

Returns a new instance of Request.



26
27
28
# File 'lib/oas/adxml.rb', line 26

def initialize(root)
  @root = root
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object

:nodoc:



30
31
32
33
34
# File 'lib/oas/adxml.rb', line 30

def method_missing method, *args, &block # :nodoc:
  Nokogiri::XML::Builder.with(@root) do |xml|
    xml.Request(:type => method.to_s) { |xml| block.call(xml) if block_given? }
  end
end