You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a small request for adding as to the default list of AllowedNames.
Describe alternatives you've considered
The alternative is to manage my own list of allowed names. Example:
Naming/MethodParameterName:
AllowedNames:
- as
- at
- by
- db
- id
- in
- io
- ip
- of
- on
- os
- pp
- to
Notice that I include as in the list above which is the only exception to the current defaults.
Additional context
I often find that I'm using as as a parameter for functional composition in Ruby where I need to have a parameter that allows me to message an object as a different representation of itself after being operated on. Example (truncated for brevity):
usemy_command,as: :to_h
The above allows me to delegate to my_command with a #call message which answers an object that can be converted to a hash via the as: :to_h parameter. The use of the as parameter allows me to have short and succinct syntax for pulling this off.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
This is a small request for adding
as
to the default list ofAllowedNames
.Describe alternatives you've considered
The alternative is to manage my own list of allowed names. Example:
Notice that I include
as
in the list above which is the only exception to the current defaults.Additional context
I often find that I'm using
as
as a parameter for functional composition in Ruby where I need to have a parameter that allows me to message an object as a different representation of itself after being operated on. Example (truncated for brevity):The above allows me to delegate to
my_command
with a#call
message which answers an object that can be converted to a hash via theas: :to_h
parameter. The use of theas
parameter allows me to have short and succinct syntax for pulling this off.The text was updated successfully, but these errors were encountered: