Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lloydmeta/enumeratum into feature…
Browse files Browse the repository at this point in the history
…/stringvalueenum
  • Loading branch information
lloydmeta committed Aug 4, 2016
2 parents 845b167 + 2481abe commit c420f5f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Integrations are available for:

### SBT

In `build.sbt`, set the Enumeratum version in a variable (for the latest version, set `val enumeratumVersion = ` the version you
In `build.sbt`, set the Enumeratum version in a variable (for the latest version, set `val enumeratumVersion = ` the version you see
in the Maven badge above).

```scala
Expand All @@ -62,7 +62,7 @@ libraryDependencies ++= Seq(
)
```

Enumeratum has different integrations that can be added to your build a la cart. For more info, see the respective secions in
Enumeratum has different integrations that can be added to your build à la carte. For more info, see the respective secions in
[the Table of Contents](#table-of-contents)

### Usage
Expand Down Expand Up @@ -136,8 +136,11 @@ Greeting.indexOf(Bye)
```

The name is taken from the `toString` method of the particular
`EnumEntry`. This behavior can be changed in two ways. The first is
to manually override the `def entryName: String` method.
`EnumEntry`. This behavior can be changed in two ways.


#### Manual override of name
The first way to change the name behaviour is to manually override the `def entryName: String` method.

```scala

Expand All @@ -160,9 +163,9 @@ State.withName("AL")

```

#### Mixins
#### Mixins to override the name

The second is to mixin the stackable traits provided for common string
The second way to override the name behaviour is to mixin the stackable traits provided for common string
conversions, `Snakecase`, `Uppercase`, and `Lowercase`.

```scala
Expand Down

0 comments on commit c420f5f

Please sign in to comment.