Sha256: 76338ce855ecd9ef64daa6d99f1a61ff31e98ce99473a5bc2864c8109700bc94

Contents?: true

Size: 350 Bytes

Versions: 2

Compression:

Stored size: 350 Bytes

Contents

module Stew
  module Store

    # The current Steam Sales
    class Sales
      include Enumerable

      def initialize(response)
        @document = Nokogiri::HTML(response)
        @sales = @document.css('div.tab_row').map{|node| Sale.new(node)}
      end

      def each(&block)
        @sales.each {|sale| yield sale}
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stew-0.6.0 lib/stew/store/sales.rb
stew-0.5.3 lib/stew/store/sales.rb