Class: Stew::Store::Sales

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/stew/store/sales.rb

Overview

The current Steam Sales

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Sales

Returns a new instance of Sales.



8
9
10
11
# File 'lib/stew/store/sales.rb', line 8

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

Instance Method Details

#each(&block) ⇒ Object



13
14
15
# File 'lib/stew/store/sales.rb', line 13

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