Class: Moxml::DocumentBuilder
- Inherits:
-
Object
- Object
- Moxml::DocumentBuilder
- Defined in:
- lib/moxml/document_builder.rb
Overview
Deprecated compatibility facade retained for 0.2-era callers.
DocumentBuilder was the parse entry point before 0.3.0 retired it
in favor of Context#parse; deleting the constant broke downstream
gems that referenced it directly (issue #124). It now delegates to
Context#parse, so build(xml_string) returns a parsed document —
unlike the 0.2-era behavior of silently returning an empty one.
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #build(xml) ⇒ Object
-
#initialize(context) ⇒ DocumentBuilder
constructor
A new instance of DocumentBuilder.
Constructor Details
#initialize(context) ⇒ DocumentBuilder
Returns a new instance of DocumentBuilder.
14 15 16 |
# File 'lib/moxml/document_builder.rb', line 14 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
12 13 14 |
# File 'lib/moxml/document_builder.rb', line 12 def context @context end |
Instance Method Details
#build(xml) ⇒ Object
18 19 20 |
# File 'lib/moxml/document_builder.rb', line 18 def build(xml) context.parse(xml) end |