Module: Xommelier::Xml::ClassMethods

Includes:
Schema
Included in:
Xommelier::Xml
Defined in:
lib/xommelier/xml.rb

Instance Method Summary collapse

Methods included from Schema

#schema, #schema=, #schema_location, #schema_location=

Instance Method Details

#xmlns(uri = nil, options = {}, &block) ⇒ Object

Defines namespace used in formats



24
25
26
27
28
29
30
# File 'lib/xommelier/xml.rb', line 24

def xmlns(uri = nil, options = {}, &block)
  if uri
    options[:module] ||= self
    instance_variable_set(:@_xmlns, Xommelier::Xml::Namespace.new(uri, options, &block))
  end
  instance_variable_get(:@_xmlns) || Xml.xmlns
end