Class: PageListFormatStrategies::Base
- Inherits:
-
Object
- Object
- PageListFormatStrategies::Base
- Defined in:
- lib/page_list_format_strategies/base.rb
Overview
Base class that represents the interface all pages format strategy classes must implement.
Direct Known Subclasses
Instance Method Summary collapse
-
#call ⇒ Object
It is expected that all sub class strategies will override this method and provide it’s own formatting algorithm / behaviour.
-
#initialize(pages:) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(pages:) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/page_list_format_strategies/base.rb', line 7 def initialize(pages:) @pages = pages end |
Instance Method Details
#call ⇒ Object
It is expected that all sub class strategies will override this method and provide it’s own formatting algorithm / behaviour. The result however is always an array of the new format the Pages have taken.
14 15 16 |
# File 'lib/page_list_format_strategies/base.rb', line 14 def call pages end |