Created
April 25, 2022 20:44
-
-
Save Loschcode/52f9d42ad3ede54625d839b527cfcbcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cycles | |
attr_reader :current, :max | |
def initialize(current: 1, max: 1) | |
@current = current | |
@max = max | |
end | |
def next | |
@current += 1 | |
end | |
def max? | |
current >= max | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment