Sha256: 87159f8aa51222e17544dc343b4a369c4e68cdda758ca41595bcb17b4ad66084

Contents?: true

Size: 845 Bytes

Versions: 4

Compression:

Stored size: 845 Bytes

Contents

module Wasserstand
  module PegelOnline
=begin
      <gewaesser>
        <name>BODENSEE</name>
        <item>
          <no>8</no>
          <psmgr>320</psmgr>
          <pegelname>KONSTANZ</pegelname>
          <messwert>380,7</messwert>
          <km>0</km>
          <pnp>391,89</pnp>
          <tendenz>Gleich</tendenz>
          <datum>13.09.2012</datum>
          <uhrzeit>20:00:00</uhrzeit>
          <pegelnummer>0906</pegelnummer>
        </item>
      </gewaesser>
=end
    class WaterwayMapper
      class << self
        def map(node)
          Waterway.new(node.xpath('name').text).tap do |ww|
            node.xpath('item').each do |item|
              level = LevelMapper.map(item)
              level.waterway = ww
              ww.levels[level.name] = level
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wasserstand-0.0.8 lib/wasserstand/provider/waterway_mapper.rb
wasserstand-0.0.7 lib/wasserstand/provider/waterway_mapper.rb
wasserstand-0.0.6 lib/wasserstand/provider/waterway_mapper.rb
wasserstand-0.0.5 lib/wasserstand/provider/waterway_mapper.rb