Groovy web console

subscribe to the feed Subscribe
to this
site
groovy fun (via #groovywebconsole)
tweet this snippet Tweet
this
script

groovy fun

Published 1 month ago by crn
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
class SuiteBuilder {
    Map tests
    def host, env, env_display_name, folder_name

    SuiteBuilder(env, props) {
        this.env_display_name = env
        this.env = env
        this.folder_name = "acc-tests-${this.env}"
        this.host = props.host
        this.tests = [:].withDefault { [] }
    }
}

x = new SuiteBuilder("prod", ["host": "127.0.0.1"])
println(x.host)