Create Flat Scope & Shared Scope.rb

This example defines two Kernel Methods (51). (Bill had to use Dynamic Dispatch (64) to access the private method define_method() on Kernel.) Both Kernel#counter() and Kernel#inc() can see the shared variable. No other method can see shared, because it’s protected by a Scope Gate (100)—that’s what the define_methods() method is for. This smart way to control the sharing of variables is called a Shared Scope.