Class: XMLObject::CollectionProxy

Inherits:
BlankishSlate show all
Defined in:
lib/xml-object/collection_proxy.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ CollectionProxy

Returns a new instance of CollectionProxy.



2
3
4
# File 'lib/xml-object/collection_proxy.rb', line 2

def initialize(target)
  @__children, @__attributes, @__target = {}, {}, target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a, &b) ⇒ Object (private)

:nodoc:



8
9
10
11
12
13
# File 'lib/xml-object/collection_proxy.rb', line 8

def method_missing(m, *a, &b) # :nodoc:
  dp = __question_dispatch(m, *a, &b)
  dp = __dot_notation_dispatch(m, *a, &b) if dp.nil?
  dp = @__target.__send__(m, *a, &b) if @__target.respond_to?(m) && dp.nil?
  dp
end