Class: Dommy::Backend::Nokolexbor::SvgNamespace

Inherits:
Struct
  • Object
show all
Defined in:
lib/dommy/backend/nokolexbor_adapter.rb

Overview

Fake “namespace” wrapper returned for nodes inside <svg> subtrees. Provides the same ‘href` API that Nokogiri’s Namespace object has, so calling code can treat them uniformly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSvgNamespace

Returns a new instance of SvgNamespace.



23
24
25
# File 'lib/dommy/backend/nokolexbor_adapter.rb', line 23

def initialize
  super("http://www.w3.org/2000/svg")
end

Instance Attribute Details

#hrefObject

Returns the value of attribute href

Returns:

  • (Object)

    the current value of href



22
23
24
# File 'lib/dommy/backend/nokolexbor_adapter.rb', line 22

def href
  @href
end