This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package PlayParameterReader | |
/** | |
* @author Jay Taylor <[email protected]> | |
* | |
* @date 2011-05-23 | |
*/ | |
import scala.collection.JavaConversions._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Loading properties with Java API's is annoying... | |
// val someInt = play.configuration("some.int", 10).toInt | |
// val someBool = "true" == play.configuration("some.boolean", "true").toLowerCase | |
// This makes it nicer. It's specifically for play but can be easily changed. | |
object config { | |
def string(name: String): Proption[String] = { | |
Proption(Option(play.configuration(name)), name) |