Class: Moxml::Adapter::CustomizedOx::Namespace
- Inherits:
-
Object
- Object
- Moxml::Adapter::CustomizedOx::Namespace
- Defined in:
- lib/moxml/adapter/customized_ox/namespace.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
- #prefix ⇒ Object
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
- #default? ⇒ Boolean
- #expanded_prefix ⇒ Object
-
#initialize(prefix, uri, parent = nil) ⇒ Namespace
constructor
A new instance of Namespace.
Constructor Details
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
7 8 9 |
# File 'lib/moxml/adapter/customized_ox/namespace.rb', line 7 def parent @parent end |
#prefix ⇒ Object
16 17 18 19 20 |
# File 'lib/moxml/adapter/customized_ox/namespace.rb', line 16 def prefix return if @prefix == "xmlns" || @prefix.nil? @prefix.to_s.delete_prefix("xmlns:") end |
#uri ⇒ Object
Returns the value of attribute uri.
7 8 9 |
# File 'lib/moxml/adapter/customized_ox/namespace.rb', line 7 def uri @uri end |
Instance Method Details
#default? ⇒ Boolean
26 27 28 |
# File 'lib/moxml/adapter/customized_ox/namespace.rb', line 26 def default? prefix.nil? end |
#expanded_prefix ⇒ Object
22 23 24 |
# File 'lib/moxml/adapter/customized_ox/namespace.rb', line 22 def ["xmlns", prefix].compact.join(":") end |