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

add enum methods #201

Closed
HassanAkbar opened this issue Dec 9, 2024 · 0 comments · Fixed by #208
Closed

add enum methods #201

HassanAkbar opened this issue Dec 9, 2024 · 0 comments · Fixed by #208
Assignees
Labels
enhancement New feature or request

Comments

@HassanAkbar
Copy link
Member

HassanAkbar commented Dec 9, 2024

Glossarist uses enum methods, and multiple values for enum are also supported, so we need to add that to the lutaml model as well.

We can make the values an enum and use collection: true to see if they contain multiple values. For example for the given snippet

class GrammarInfo
  attribute :number, values: %w[singular dual plural], collection: true
end

Current behavior:

The above snippet does not parse multiple values for number i.e `number = %w[dual plural]

Expected behavior:

The above snippet should parse multiple values for number i'e `number = %w[dual plural]

blocking -> glossarist/glossarist-ruby#107

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

Successfully merging a pull request may close this issue.

1 participant