Module: Metaprogrammer
- Extended by:
- Metaprogrammer
- Included in:
- Metaprogrammer
- Defined in:
- lib/version.rb,
lib/metaprogrammer.rb,
lib/metaprogrammer/usages.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.0.2'
Class Method Summary collapse
Methods included from Usages
Methods included from Core
#patch_all_methods, #patch_class_methods, #patch_instance_methods
Class Method Details
.filter_methods(fns, only: nil, except: nil) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/metaprogrammer.rb', line 49 def self.filter_methods(fns, only: nil, except: nil) if only only = Set.new(only) fns = fns.select(&only.method(:member?)) end if except except = Set.new(except) fns = fns.reject(&except.method(:member?)) end fns end |