Skip to content

Instantly share code, notes, and snippets.

@alexy
Created April 3, 2012 19:51
Show Gist options
  • Save alexy/2295110 to your computer and use it in GitHub Desktop.
Save alexy/2295110 to your computer and use it in GitHub Desktop.
packaging scallop options
case object o {
val suffix: Boolean = opts[Boolean]("suffix")
val csv: Boolean = opts[Boolean]("csv")
val minMax: Option[Int] = opts.get("min")
override def toString: String =
"\n"+
"\n suffix=> " + suffix +
"\n csv => " + csv +
"\n minMax=> " + (minMax match { case Some(n) => n.toString; case _ => "nothing" })
"\n"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment