Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: attribute scoped sequence #1683

Open
kakubin opened this issue Jul 26, 2024 · 2 comments
Open

Feature request: attribute scoped sequence #1683

kakubin opened this issue Jul 26, 2024 · 2 comments
Labels

Comments

@kakubin
Copy link

kakubin commented Jul 26, 2024

Problem this feature will solve

As I mentioned in #1640, I want a scope for sequence.
The previous PR I created was not reviewed, so I made it as a separate gem. However, maintaining it individually seems troublesome, so I would like this to be merged.

@colinross
Copy link
Contributor

Does your priority HAVE to start with 1 under each scope? if not, just use a normal (inline) sequence.

@kakubin
Copy link
Author

kakubin commented Oct 4, 2024

@colinross
I want different sequence generators for each scope. Starting with 1 is optional, see L13.

class Sequence
attr_reader :name
def initialize(name, *args, &proc)
@name = name
@proc = proc
options = args.extract_options!
@value = args.first || 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants