Skip to content

Commit

Permalink
#5 add a method in Fields in order to get InputValue
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Dec 7, 2016
1 parent 8289ac3 commit e4e8e93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/org/elastic4play/controllers/Fields.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ object NullInputValue extends InputValue {
* Contain data values from HTTP request
*/
class Fields(private val fields: Map[String, InputValue]) {
/**
* Get InputValue
*/
def get(name: String): Option[InputValue] = {
fields.get(name)
}

/**
* Get data value as String. Returns None if field doesn't exist or format is not a string
*/
Expand Down

0 comments on commit e4e8e93

Please sign in to comment.