Module: Xommelier::Xml::Element::Namespace::ClassMethods

Defined in:
lib/xommelier/xml/element/namespace.rb

Instance Method Summary collapse

Instance Method Details

#schemaNokogiri::XML::Schema

Returns schema associated with element's namespace or module.

Returns:

  • (Nokogiri::XML::Schema)

    schema associated with element's namespace or module



36
# File 'lib/xommelier/xml/element/namespace.rb', line 36

delegate :schema, to: :containing_module

#schema_locationString

Returns path to schema file.

Returns:

  • (String)

    path to schema file



39
# File 'lib/xommelier/xml/element/namespace.rb', line 39

delegate :schema_location, to: :containing_module

#xmlns(value = nil) ⇒ Xommelier::Xml::Namespace

Returns associated namespace.

Returns:



20
21
22
23
# File 'lib/xommelier/xml/element/namespace.rb', line 20

def xmlns(value = nil)
  self.xmlns = value if value
  @xmlns ||= find_namespace
end

#xmlns=(value) ⇒ Object

Parameters:



26
27
28
29
30
31
32
33
# File 'lib/xommelier/xml/element/namespace.rb', line 26

def xmlns=(value)
  @xmlns = case value
           when Module
             value.xmlns
           else
             value
           end
end