Class: Xmldsig::Canonicalizer

Inherits:
Object
  • Object
show all
Defined in:
lib/xmldsig/canonicalizer.rb

Defined Under Namespace

Classes: UnsupportedException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, method = nil, inclusive_namespaces = nil, with_comments = false) ⇒ Canonicalizer

Returns a new instance of Canonicalizer.



7
8
9
10
11
12
# File 'lib/xmldsig/canonicalizer.rb', line 7

def initialize(node, method = nil, inclusive_namespaces = nil, with_comments = false)
  @node                 = node
  @method               = method
  @inclusive_namespaces = inclusive_namespaces
  @with_comments        = with_comments
end

Instance Attribute Details

#inclusive_namespacesObject

Returns the value of attribute inclusive_namespaces.



5
6
7
# File 'lib/xmldsig/canonicalizer.rb', line 5

def inclusive_namespaces
  @inclusive_namespaces
end

#methodObject

Returns the value of attribute method.



5
6
7
# File 'lib/xmldsig/canonicalizer.rb', line 5

def method
  @method
end

#nodeObject

Returns the value of attribute node.



5
6
7
# File 'lib/xmldsig/canonicalizer.rb', line 5

def node
  @node
end

#with_commentsObject

Returns the value of attribute with_comments.



5
6
7
# File 'lib/xmldsig/canonicalizer.rb', line 5

def with_comments
  @with_comments
end

Instance Method Details

#canonicalizeObject



14
15
16
# File 'lib/xmldsig/canonicalizer.rb', line 14

def canonicalize
  node.canonicalize(mode(method), inclusive_namespaces, with_comments)
end