Class: Builder::XmlBase
- Inherits:
-
Object
show all
- Defined in:
- lib/rack_dav/builder_namespace.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
15
16
17
18
|
# File 'lib/rack_dav/builder_namespace.rb', line 15
def method_missing(sym, *args, &block)
sym = "#{@namespace}:#{sym}" if @namespace
method_missing_without_namespace(sym, *args, &block)
end
|
Instance Method Details
#method_missing_without_namespace ⇒ Object
13
|
# File 'lib/rack_dav/builder_namespace.rb', line 13
alias_method :method_missing_without_namespace, :method_missing
|
#namespace(ns) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/rack_dav/builder_namespace.rb', line 5
def namespace(ns)
old_namespace = @namespace
@namespace = ns
yield
@namespace = old_namespace
self
end
|