Class: BasicWay
- Inherits:
-
Object
- Object
- BasicWay
- Defined in:
- lib/product_home_template.rb
Overview
This class provides the template method of providing the output to show products by ranking, click history and general method.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(param) ⇒ BasicWay
constructor
this method initializes the hash array with a specific store details.
-
#my_special_method(pages) ⇒ Object
this method to run the logic of sorting the products with pagination.
-
#my_special_method_without(member) ⇒ Object
this method to run the logic of sorting the products with pagination.
-
#with_page(pages) ⇒ Object
this method provides the products array with pagination type.
-
#without_page(member) ⇒ Object
this method provides the products array without pagination type.
Constructor Details
#initialize(param) ⇒ BasicWay
this method initializes the hash array with a specific store details.
5 6 7 |
# File 'lib/product_home_template.rb', line 5 def initialize(param) @store_detail = StoreDetail.find(param) end |
Instance Method Details
#my_special_method(pages) ⇒ Object
this method to run the logic of sorting the products with pagination
20 21 22 |
# File 'lib/product_home_template.rb', line 20 def my_special_method(pages) puts("triggered in abstract") end |
#my_special_method_without(member) ⇒ Object
this method to run the logic of sorting the products with pagination
25 26 27 |
# File 'lib/product_home_template.rb', line 25 def my_special_method_without(member) puts("triggered in abstract") end |
#with_page(pages) ⇒ Object
this method provides the products array with pagination type
10 11 12 |
# File 'lib/product_home_template.rb', line 10 def with_page(pages) my_special_method(pages) end |
#without_page(member) ⇒ Object
this method provides the products array without pagination type
15 16 17 |
# File 'lib/product_home_template.rb', line 15 def without_page(member) my_special_method_without(member) end |