Module: XMLable::Mixins::NamespaceDefinitionsStorage::ClassMethods
- Defined in:
- lib/xmlable/mixins/namespace_definitions_storage.rb
Instance Method Summary collapse
-
#__default_namespace ⇒ Symbol?
private
Default namespace prefix.
-
#__default_namespace=(val) ⇒ Object
private
Set default namespace prefix.
-
#__namespace_definitions ⇒ XMLable::Handlers::Storage
private
Get namespace definition handlers.
-
#namespace(*args) ⇒ Object
Define XML namespace.
Instance Method Details
#__default_namespace ⇒ Symbol?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Default namespace prefix
77 78 79 |
# File 'lib/xmlable/mixins/namespace_definitions_storage.rb', line 77 def __default_namespace @__default_namespace end |
#__default_namespace=(val) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Set default namespace prefix
88 89 90 |
# File 'lib/xmlable/mixins/namespace_definitions_storage.rb', line 88 def __default_namespace=(val) @__default_namespace = val end |
#__namespace_definitions ⇒ XMLable::Handlers::Storage
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get namespace definition handlers
99 100 101 |
# File 'lib/xmlable/mixins/namespace_definitions_storage.rb', line 99 def __namespace_definitions @__namespace_definitions ||= [] end |
#namespace(*args) ⇒ Object
Define XML namespace
62 63 64 65 66 67 68 |
# File 'lib/xmlable/mixins/namespace_definitions_storage.rb', line 62 def namespace(*args) opts = args.last.is_a?(Hash) ? args.pop : {} default = opts.delete(:default) || true h = Handlers::Namespace.new(*args, opts) self.__default_namespace = h.prefix if default __namespace_definitions << h end |