def create_class type eval class type BasicType providers ProviderArra

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
def create_class(type)
eval "
class #{type} < BasicType
@providers=ProviderArray.new # you need this assignment in each inherited class
end
"
end
create_class("UserName")
create_class("UniqueUserName")
create_class("TrafficLimit")
create_class("UniqueTrafficLimit")