Skip to content

Instantly share code, notes, and snippets.

@aryairani
Last active December 28, 2015 05:49
Show Gist options
  • Save aryairani/7452375 to your computer and use it in GitHub Desktop.
Save aryairani/7452375 to your computer and use it in GitHub Desktop.
implicit class RichProperties(properties: Properties) {
import scalaz.syntax.std.boolean._
def getIfTrue[T](key: String, value: => T) =
(properties.get(key) == "true").option(value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment