Class: Module
Overview
Instance Method Summary collapse
Instance Method Details
#act_on_methods(*meths) ⇒ Object
18 19 20 21 22 |
# File 'lib/rextra/cutting.rb', line 18 def act_on_methods *meths (meths.empty? ? instance_methods : meths).each do |meth| yield meth unless %w{__id__ __send__}.include? meth end end |
#empty_methods(*meths) ⇒ Object
28 29 30 31 32 |
# File 'lib/rextra/cutting.rb', line 28 def empty_methods *meths act_on_methods *meths do |meth| class_def meth do nil end end end |
#undef_methods(*meths) ⇒ Object
23 24 25 26 27 |
# File 'lib/rextra/cutting.rb', line 23 def undef_methods *meths act_on_methods *meths do |meth| undef_method meth end end |