Class: Sphyg::Enumerators::Base
- Inherits:
-
Object
- Object
- Sphyg::Enumerators::Base
- Defined in:
- lib/sphyg/enumerators/base.rb
Overview
Enumerator template
Defined Under Namespace
Classes: AbstractMethodCall
Instance Method Summary collapse
-
#initialize(frames) ⇒ Base
constructor
A new instance of Base.
-
#next ⇒ Object
‘next` is called at each iteration of a throbber’s existance.
Constructor Details
#initialize(frames) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/sphyg/enumerators/base.rb', line 7 def initialize(frames) @frames = frames end |
Instance Method Details
#next ⇒ Object
‘next` is called at each iteration of a throbber’s existance. It returns the throbber state to display. For example, simply looping a given array is implemented in ‘Enumerators::Cycle’.
14 15 16 |
# File 'lib/sphyg/enumerators/base.rb', line 14 def next raise AbstractMethodCall, 'Implement :run in a child class' end |