Class: Cheri::Xml::Namespace
- Inherits:
-
Object
- Object
- Cheri::Xml::Namespace
show all
- Defined in:
- lib/cheri/builder/xml/element.rb
Instance Method Summary
collapse
Constructor Details
#initialize(ctx, prefix, uri = nil) ⇒ Namespace
Returns a new instance of Namespace.
277
278
279
280
281
|
# File 'lib/cheri/builder/xml/element.rb', line 277
def initialize(ctx,prefix,uri=nil)
@ctx = ctx
@pfx = prefix.to_sym
@uri = uri if uri
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *r, &k) ⇒ Object
296
297
298
|
# File 'lib/cheri/builder/xml/element.rb', line 296
def method_missing(sym,*r,&k)
@ctx.nsend(mod,@pfx,sym,*r,&k)
end
|
Instance Method Details
#__prefix__ ⇒ Object
283
284
285
|
# File 'lib/cheri/builder/xml/element.rb', line 283
def __prefix__
@pfx
end
|
#__uri__ ⇒ Object
287
288
289
|
# File 'lib/cheri/builder/xml/element.rb', line 287
def __uri__
@uri
end
|
#inspect ⇒ Object
301
302
303
|
# File 'lib/cheri/builder/xml/element.rb', line 301
def inspect
"#<#{self.class}:instance>"
end
|