Sha256: ba6bdbed2317276e7f138a054a3c649ff6a8b5074149a8a44ec95542525515cc

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

module HatebuWatcher
  class Base
    def initialize(url, interval)
      @interval = interval

      @counter = Counter.new(url)
      @counter.add_observer(Observers::CounterObserver.new)
    end

    def watch
      loop do
        puts @counter.reload.count

        sleep @interval
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hatebu_watcher-0.0.1 lib/hatebu_watcher/base.rb