Skip to content

Instantly share code, notes, and snippets.

View dyross's full-sized avatar

David Y. Ross dyross

View GitHub Profile
@dyross
dyross / config.scala
Created January 12, 2012 22:54
Scala DSL for loading properties in Play!
// 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)
@jaytaylor
jaytaylor / PlayParameterReader.scala
Created July 11, 2011 21:52
Nice ParaNameReader for the Play! Framework v.1.2.2
package PlayParameterReader
/**
* @author Jay Taylor <outtatime@gmail.com>
*
* @date 2011-05-23
*/
import scala.collection.JavaConversions._