Class: XMLable::Handlers::Namespace
- Inherits:
-
Object
- Object
- XMLable::Handlers::Namespace
- Defined in:
- lib/xmlable/handlers/namespace.rb
Overview
Namespace handles XML namespace objects
Instance Attribute Summary collapse
-
#href ⇒ Symbol
readonly
Returns namespace’s URI.
-
#prefix ⇒ Symbol
readonly
Returns namespace’s URI.
Instance Method Summary collapse
-
#initialize(prefix_or_href = nil, href = nil, _opts = {}) ⇒ Namespace
constructor
A new instance of Namespace.
Constructor Details
#initialize(prefix_or_href = nil, href = nil, _opts = {}) ⇒ Namespace
Returns a new instance of Namespace.
16 17 18 19 20 21 22 23 |
# 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 |
Instance Attribute Details
#href ⇒ Symbol (readonly)
Returns namespace’s URI
10 11 12 |
# File 'lib/xmlable/handlers/namespace.rb', line 10 def href @href end |
#prefix ⇒ Symbol (readonly)
Returns namespace’s URI
8 9 10 |
# File 'lib/xmlable/handlers/namespace.rb', line 8 def prefix @prefix end |