Class: MediaProcessingTool::XMLParser::Document
- Inherits:
-
Object
- Object
- MediaProcessingTool::XMLParser::Document
- Defined in:
- lib/media_processing_tool/xml_parser/document.rb
Direct Known Subclasses
Class Method Summary collapse
-
.load(xml, params = { }) ⇒ Object
self.xml_as_document.
- .xml_as_document(xml, params = {}) ⇒ Object
Instance Method Summary collapse
-
#initialize(xml, params = { }) ⇒ Document
constructor
self.load.
-
#root ⇒ Object
xml_document.
-
#root_type ⇒ Object
Gets the.
-
#xml_document ⇒ Object
initialize.
Constructor Details
#initialize(xml, params = { }) ⇒ Document
self.load
17 18 19 |
# File 'lib/media_processing_tool/xml_parser/document.rb', line 17 def initialize(xml, params = { }) @xml_document = self.class.xml_as_document(xml, params) end |
Class Method Details
.load(xml, params = { }) ⇒ Object
self.xml_as_document
13 14 15 |
# File 'lib/media_processing_tool/xml_parser/document.rb', line 13 def self.load(xml, params = { }) new(xml, params) end |
.xml_as_document(xml, params = {}) ⇒ Object
9 10 11 |
# File 'lib/media_processing_tool/xml_parser/document.rb', line 9 def self.xml_as_document(xml, params = {}) AXML.xml_as_document(xml) end |
Instance Method Details
#root ⇒ Object
xml_document
25 26 27 |
# File 'lib/media_processing_tool/xml_parser/document.rb', line 25 def root xml_document.root end |
#root_type ⇒ Object
Gets the
30 31 32 |
# File 'lib/media_processing_tool/xml_parser/document.rb', line 30 def root_type @root_type ||= root.name end |
#xml_document ⇒ Object
initialize
21 22 23 |
# File 'lib/media_processing_tool/xml_parser/document.rb', line 21 def xml_document @xml_document end |