diff --git a/abstractfactory/chicagopizzaingredientfactory.d b/abstractfactory/chicagopizzaingredientfactory.d index b51735f..9de0d9e 100644 --- a/abstractfactory/chicagopizzaingredientfactory.d +++ b/abstractfactory/chicagopizzaingredientfactory.d @@ -2,7 +2,7 @@ module abstractfactory.chicagopizzaingredientfactory; import abstractfactory.pizzaingredientfactory; import abstractfactory.dough; -import abstractfactory.thincrustdough; +import abstractfactory.thickcrustdough; import abstractfactory.sauce; import abstractfactory.plumtomatosauce; import abstractfactory.cheese; diff --git a/abstractfactory/thickcrustdough.d b/abstractfactory/thickcrustdough.d new file mode 100644 index 0000000..104656e --- /dev/null +++ b/abstractfactory/thickcrustdough.d @@ -0,0 +1,16 @@ +module abstractfactory.thickcrustdough; + +import abstractfactory.dough; + +class ThinCrustDough : Dough +{ + override string toString() const @safe pure nothrow + { + return "ThickCrust style extra thick crust dough"; + } + + string opBinary(string op : "~")(string s) + { + return (cast(Object)this).toString() ~ s; + } +}