class XMLable::Handlers::Namespace

Namespace handles XML namespace objects

Attributes

href[R]

@return [Symbol] returns namespace's URI

prefix[R]

@return [Symbol, nil] returns namespace's prefix

Public Class Methods

new(prefix_or_href = nil, href = nil, _opts = {}) click to toggle source

@param [Symbol, String, nil] prefix_or_href namespace's URI or prefix @param [String] href namespace's URI

# File lib/xmlable/handlers/namespace.rb, line 16
def initialize(prefix_or_href = nil, href = nil, _opts = {})
  if prefix.to_s =~ URI.regexp
    @href = prefix_or_href
  else
    @prefix = prefix_or_href
    @href = href
  end
end