Best way to create singleton object with parameter

I wonder what is the best way in Scala to create a singleton object, but with a parameter.

I am still kind of new to Scala, and try to use it in my daily project. My understanding is that object is the way in Scala for singleton pattern.

object Foo {
  val s = "init"
  def append(a: String): String = {
    a + s
  }
}

I want to make sure that in the JVM, there is only one instance of Foo, so using Object is just nature in Scala here, right?

But my issue is that when I create this single instance, I want to pass into a parameter. In the above simple example, let’s say “init” need to to be passed at runtime. I cannot find a good way to do that in Object in Scala. Object in Scala cannot have auxiliary constructor, so I don’t have a good way to do this only use Object. Right now, I have to write the class and companion object for this, and then I have to restrict my class, so only instances can be created through companion object, and forcing only one instance in the apply() method. All these doesn’t look right, but I don’t know what is the best way to create singleton object with a passed parameter.

see https://stackoverflow.com/q/16901419/86485
and https://stackoverflow.com/q/27801150/86485