Added a very basic Namespace class.
This commit is contained in:
parent
d7df908649
commit
e0bbc81351
|
@ -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
|
Loading…
Reference in New Issue