Class: Moxml::Context
- Inherits:
-
Object
- Object
- Moxml::Context
- Defined in:
- lib/moxml/context.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #create_document(native_doc = nil) ⇒ Object
-
#initialize(adapter = nil) ⇒ Context
constructor
A new instance of Context.
- #parse(xml, options = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/moxml/context.rb', line 5 def config @config end |
Instance Method Details
#create_document(native_doc = nil) ⇒ Object
11 12 13 |
# File 'lib/moxml/context.rb', line 11 def create_document(native_doc = nil) Document.new(config.adapter.create_document(native_doc), self) end |
#parse(xml, options = {}) ⇒ Object
15 16 17 |
# File 'lib/moxml/context.rb', line 15 def parse(xml, = {}) config.adapter.parse(xml, .merge()) end |