Added a very basic Namespace class.

This commit is contained in:
Yorick Peterse 2014-08-06 00:00:08 +02:00
parent d7df908649
commit e0bbc81351
1 changed files with 29 additions and 0 deletions

29
lib/oga/xml/namespace.rb Normal file
View File

@ -0,0 +1,29 @@
module Oga
module XML
##
# The Namespace class contains information about XML namespaces such as the
# name and URI.
#
class Namespace
attr_accessor :name, :uri
##
# @param [Hash] options
#
# @option options [String] :name
# @option options [String] :uri
#
def initialize(options = {})
@name = options[:name]
@uri = options[:uri]
end
##
# @return [String]
#
def to_s
return name.to_s
end
end # Namespace
end # XML
end # Oga