Mention AroundDecorator in README.txt.
[decorate.git] / lib / decorate / protected_method.rb
blob46736386cfb97972d8ae044be368cc837a806479
1 require "decorate"
3 module Decorate::ProtectedMethod
4   # protected_method decorator - makes the next defined method
5   # protected. Otherwise works like
6   # Decorate::PrivateMethod#private_method.
7   def protected_method #:doc:
8     Decorate.decorate { |klass, method_name|
9       klass.send :protected, method_name
10     }
11   end
12   private :protected_method
13 end
15 class Module
16   include Decorate::ProtectedMethod
17 end
19 extend Decorate::ProtectedMethod