lucascaton/enumerate_it

Can enumeration be casted to hash?

Opened this issue · 1 comments

Hello, can I fetch key-value collection from enum object?

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"] }