class DWML

Note: See graphical.weather.gov/xml/mdl/XML/Design/MDL_XML_Design.pdf for authoritative type definitions

Constants

VERSION

Attributes

output[R]
xmldoc[R]

Public Class Methods

new(xmldoc) click to toggle source
# File lib/dwml.rb, line 14
def initialize(xmldoc)
  @xmldoc = xmldoc
  @output = {}
end

Public Instance Methods

process() click to toggle source
# File lib/dwml.rb, line 19
def process
  build_head
  build_data
  output
end

Protected Instance Methods

build_data() click to toggle source
# File lib/dwml.rb, line 32
def build_data
  extractor = DataExtractor.new(xmldoc.xpath("//dwml/data").first)
  @output.merge!(extractor.process)
end
build_head() click to toggle source
# File lib/dwml.rb, line 27
def build_head
  extractor = HeadExtractor.new(xmldoc.xpath("//dwml/head").first)
  @output.merge!(extractor.process)
end