Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
module MyNamespace def self.included(klass) klass.send :include, InstanceMethods klass.send :extend, ClassMethods end module InstanceMethods def foo 'bar from instance' end end module ClassMethods def foo 'bar from class' end end end class MyClass include MyNamespace end MyClass.foo # => "bar from class" MyClass.new.foo # => "bar from instance"
This paste will be private.
From the Design Piracy series on my blog: