elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.88k stars 586 forks source link

Documentation about builder_opts() unclear #1009

Closed ahamez closed 3 years ago

ahamez commented 3 years ago

The documentation of builder_opts() says:

Annotates a plug will receive the options given to the current module itself as arguments.

Should it be something like:

A plug annotated with this macro will receive the options given to the current module itself as arguments.

?

josevalim commented 3 years ago

I have been told to avoid passive voice whenever possible, so unless there is something incorrect about the current approach, I would keep it as is.

ahamez commented 3 years ago

Sorry, I wasn't clear: it seems that a word is missing between a plug and will. It seems to me a subject is missing to the verb will as plugis already the 'target' (sorry I don't know the name for this) of the verb Annotates. Maybe just a that? I hope it makes sense 😬 (and yes, you're right about the passive voice, my fix is not a good one…)

josevalim commented 3 years ago

The subject of “annotates” is the function itself. I.e. “this function annotates a plug will receive”. :)

ahamez commented 3 years ago

I'm still unable to parse it 😅. But it's clearly only a problem with me 😢, so I'll close this ticket. Thank you for your explanation 🙂!