Class: Stew::Store::AppOffers
- Inherits:
-
Object
- Object
- Stew::Store::AppOffers
- Includes:
- Enumerable
- Defined in:
- lib/stew/store/app_offers.rb
Overview
The offers of an application
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(node) ⇒ AppOffers
constructor
A new instance of AppOffers.
- #sale? ⇒ Boolean
- #sales ⇒ Object
Constructor Details
Instance Method Details
#each(&block) ⇒ Object
12 13 14 |
# File 'lib/stew/store/app_offers.rb', line 12 def each(&block) @app_offers.each {|item| yield item} end |
#sale? ⇒ Boolean
16 17 18 |
# File 'lib/stew/store/app_offers.rb', line 16 def sale? sales.count != 0 end |
#sales ⇒ Object
20 21 22 |
# File 'lib/stew/store/app_offers.rb', line 20 def sales @app_offers.select {|item| item.sale?} end |