Sha256: c9c1aa6e16162f4c0503385b5bd536365a66d331f49ba406a6f6f21b1297eeb3

Contents?: true

Size: 461 Bytes

Versions: 9

Compression:

Stored size: 461 Bytes

Contents

require 'xommelier/xml'

module Xommelier
  module Xml
    module ClassMethods
      def ns
        Xommelier::Xml::Namespace.registry
      end

      # Defines namespace used in formats
      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
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
xommelier-0.1.7 lib/xommelier/xml/class_methods.rb
xommelier-0.1.6 lib/xommelier/xml/class_methods.rb
xommelier-0.1.5 lib/xommelier/xml/class_methods.rb
xommelier-0.1.4 lib/xommelier/xml/class_methods.rb
xommelier-0.1.3 lib/xommelier/xml/class_methods.rb
xommelier-0.1.2 lib/xommelier/xml/class_methods.rb
xommelier-0.1.1 lib/xommelier/xml/class_methods.rb
xommelier-0.1.0 lib/xommelier/xml/class_methods.rb
xommelier-0.0.2 lib/xommelier/xml/class_methods.rb