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

Handle atom inputs #52

Open
lustrousgorilla opened this issue Apr 1, 2019 · 3 comments
Open

Handle atom inputs #52

lustrousgorilla opened this issue Apr 1, 2019 · 3 comments

Comments

@lustrousgorilla
Copy link

What do you think about also handling atom inputs? I'm happy to make a PR to implement this enhancement if you're on board.

@sobolevn
Copy link
Member

sobolevn commented Apr 2, 2019

You mean recasing atoms?

Recase.to_pascal(:"some-value") == :"SomeCase"

Why do you need it?

@lustrousgorilla
Copy link
Author

I can think of a few use cases, but my immediate use case is generating select options in a Phoenix view helper. I need to map over a bunch of atoms to turn each value like :some_atom into a label string "Some Atom".

@sobolevn
Copy link
Member

sobolevn commented Apr 2, 2019

Can you do it this way:

  1. atom -> string
  2. string snake -> string other case

?

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

No branches or pull requests

2 participants