ConfigDelegate

@FunctionalInterface

Gets T from config.

import com.typesafe.config.{ Config, ConfigFactory }
import little.config.{ ConfigDelegate, ConfigMethods }

case class User(id: Int, name: String)

// Define how to get User from Config
given ConfigDelegate[User] with
 def get(config: Config, path: String): User =
   val user = config.getConfig(path)
   User(user.getInt("id"), user.getString("name"))

val config = ConfigFactory.parseString("user { id = 0, name = root }")

// Get User from Config
val user = config.get[User]("user")
class Object
trait Matchable
class Any
object booleanDelegate.type
object configDelegate.type
object doubleDelegate.type
object durationDelegate.type
object fileDelegate.type
object intDelegate.type
object longDelegate.type
object memorySizeDelegate.type
object periodDelegate.type
object stringDelegate.type

Value members

Abstract methods

def get(config: Config, path: String): T

Gets T at specified path in config.

Gets T at specified path in config.

Value parameters:
config

config from which to get value

path

path at which to get value