Class: Calligraphy::XML::Namespace

Inherits:
Object
  • Object
show all
Defined in:
lib/calligraphy/xml/namespace.rb

Overview

Simple XML namespace, used to store a namespace’s href and prefix values.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace) ⇒ Namespace

:nodoc:



10
11
12
13
# File 'lib/calligraphy/xml/namespace.rb', line 10

def initialize(namespace)
  @href = namespace.href if namespace.href
  @prefix = namespace.prefix if namespace.prefix
end

Instance Attribute Details

#hrefObject

Returns the value of attribute href.



7
8
9
# File 'lib/calligraphy/xml/namespace.rb', line 7

def href
  @href
end

#prefixObject

Returns the value of attribute prefix.



7
8
9
# File 'lib/calligraphy/xml/namespace.rb', line 7

def prefix
  @prefix
end