Class: Saxon::DocumentBuilder::ConfigurationDSL
- Inherits:
-
Object
- Object
- Saxon::DocumentBuilder::ConfigurationDSL
- Defined in:
- lib/saxon/document_builder.rb
Overview
Provides a simple configuraion DSL for DocumentBuilders.
Class Method Summary collapse
-
.define(document_builder, block) ⇒ Object
private
Create a new instance and
instance_exec
the passed-in block against it.
Instance Method Summary collapse
-
#base_uri(value) ⇒ Object
Sets the base URI of documents created using this instance.
-
#dtd_validation(value) ⇒ Object
Sets the base URI of documents created using this instance.
-
#initialize(document_builder) ⇒ ConfigurationDSL
constructor
private
A new instance of ConfigurationDSL.
-
#line_numbering(value) ⇒ Object
Sets line numbering on or off.
-
#whitespace_stripping_policy(value) ⇒ Object
Sets the base URI of documents created using this instance.
Constructor Details
#initialize(document_builder) ⇒ ConfigurationDSL
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.
Returns a new instance of ConfigurationDSL.
18 19 20 |
# File 'lib/saxon/document_builder.rb', line 18 def initialize(document_builder) @document_builder = document_builder end |
Class Method Details
.define(document_builder, block) ⇒ 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.
Create a new instance and instance_exec
the passed-in block against it
13 14 15 |
# File 'lib/saxon/document_builder.rb', line 13 def self.define(document_builder, block) new(document_builder).instance_exec(&block) end |
Instance Method Details
#base_uri(value) ⇒ Object
Sets the base URI of documents created using this instance.
36 37 38 |
# File 'lib/saxon/document_builder.rb', line 36 def base_uri(value) @document_builder.base_uri = value end |
#dtd_validation(value) ⇒ Object
Sets the base URI of documents created using this instance.
54 55 56 |
# File 'lib/saxon/document_builder.rb', line 54 def dtd_validation(value) @document_builder.dtd_validation = value end |
#line_numbering(value) ⇒ Object
Sets line numbering on or off
27 28 29 |
# File 'lib/saxon/document_builder.rb', line 27 def line_numbering(value) @document_builder.line_numbering = value end |
#whitespace_stripping_policy(value) ⇒ Object
Sets the base URI of documents created using this instance.
45 46 47 |
# File 'lib/saxon/document_builder.rb', line 45 def whitespace_stripping_policy(value) @document_builder.whitespace_stripping_policy = value end |