lib/wasserstand/level.rb in wasserstand-0.0.7 vs lib/wasserstand/level.rb in wasserstand-0.0.8

- old
+ new

@@ -3,18 +3,24 @@ # see http://www.pegelonline.wsv.de/gast/hilfe#hilfe_pegelparameter # class Level # Pegel class << self def [](name) - Wasserstand.level_provider[name] + provider[name] end def all - Wasserstand.level_provider.all + provider.all end def find_by_name(regex) - Wasserstand.level_provider.find_by_name(regex) + provider.find_by_name(regex) + end + + private + + def provider + Wasserstand.providers[PegelOnline::LevelProvider] end end attr_reader :name attr_accessor :level_id, :km, :measurements