Class: Moxml::DocumentBuilder

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#contextObject (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