require "objectteam"
require "../simple/counter"

#create 2 instances of Simple.
e = Simple.new("earth")
m = Simple.new("mars")
#create connector with applied block to see, which role gets created.
countteam = CountHello.new() { |base, roleclass|
  puts "create role for #{base.to_s}\n"
  roleclass.new #return a new roleclass
}


puts "=======no role created======="
role1 = countteam.as_role(e)
role2 = countteam.as_role(m)

role1.inc
role1.inc
role2.inc
role2.inc
