Method: WithPublic#with_public
- Defined in:
- lib/with_public.rb
#with_public(*methods) ⇒ Module
Returns a refiner module to make target methods public
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/with_public.rb', line 17 def with_public(*methods) target = self Module.new.tap do |refiner| refiner.module_eval do refine target do public(*methods) end end end end |