namespaces - Any notes or rules for naming ruby gems with '-' or '_'? -
this question has answer here:
when create ruby gem , name it, paying attentions name '-' or '_' ? there differences use between '-' , '_'?
$ gem list|egrep "\-|_" actionmailer-with-request (0.4.0, 0.3.0) activerecord-deprecated_finders (1.0.2, 0.0.3) activerecord-import (0.3.1) : :
i feel there rules not sure @ moment. take learn rules or guidances if exist. , want take @ code of gems (near-)perfectly compliant roles if know gems named '-' or '_', please give answers well.
there examples of gems don't follow convention. convention have come best using -
denote namespace (::
) boundary , _
word separator within class name.
examples:
| main class | gem name | require | |-------------------|-------------------|-------------------| | redis | redis | redis | | redis::namespace | redis-namespace | redis/namespace | | redis::nativehash | redis-native_hash | redis/native_hash |
Comments
Post a Comment