Can enumeration be casted to hash?
Opened this issue · 1 comments
Deleted user commented
Hello, can I fetch key-value collection from enum object?
lucascaton commented
Hey @georgeeeeb, is this what you want?
class Locale < EnumerateIt::Base
associate_values(
:en,
:'pt-BR'
)
end
> Locale.enumeration
{ :en=>["en", :en], :"pt-BR"=>["pt-BR", :"pt-BR"] }