Skip to content

Commit

Permalink
Added entry for CamelCase enum value
Browse files Browse the repository at this point in the history
The approved style for enum values is CamelCase, as per crystal-lang/crystal#7270

However this is not stated in the style guide, although the approved style for constants is.
  • Loading branch information
crush-157 authored May 6, 2020
1 parent c92925b commit 1a7276a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions conventions/coding_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ LUCKY_NUMBERS = [3, 7, 11]
DOCUMENTATION_URL = "http://crystal-lang.org/docs"
```

__Enum Value Names__ are camelcased. For example:

```crystal
enum IceCream::Flavour
Vanilla
SaltedCaramel
MintChocChip
end
```
### Acronyms

In class names, acronyms are _all-uppercase_. For example, `HTTP`, and `LibXML`.
Expand Down

0 comments on commit 1a7276a

Please sign in to comment.