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

Symbols? #41

Open
sam0x17 opened this issue Jan 12, 2021 · 3 comments
Open

Symbols? #41

sam0x17 opened this issue Jan 12, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@sam0x17
Copy link

sam0x17 commented Jan 12, 2021

My expectation when using this gem was that the values would be automatically returned as symbols, however strings are used by default.

If I submit a pull request that adds the option to have enums be automatically returned as symbols, and make this option configurable and off by default, would that be reasonable, or are you against that line of thinking?

@bibendi
Copy link
Owner

bibendi commented Jan 12, 2021

Hi!
Sounds good!

@bibendi bibendi added the enhancement New feature or request label Jan 12, 2021
@sam0x17
Copy link
Author

sam0x17 commented Jan 13, 2021 via email

@bibendi
Copy link
Owner

bibendi commented Jan 14, 2021

I think it is here

class Enum < Type::Value # :nodoc:
attr_reader :enum_name
def initialize(enum_name:, **kwargs)
@enum_name = enum_name.to_sym
super(**kwargs)
end
end

I have no more guesses :)

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

No branches or pull requests

2 participants