Class: Cheri::Xml::Namespace

Inherits:
Object
  • Object
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 (private)



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

#inspectObject



301
302
303
# File 'lib/cheri/builder/xml/element.rb', line 301

def inspect
  "#<#{self.class}:instance>"  
end