Class: Robe::MethodScanner
Instance Attribute Summary
Attributes inherited from Scanner
Instance Method Summary collapse
-
#initialize(*args) ⇒ MethodScanner
constructor
A new instance of MethodScanner.
- #scan_methods(mod, coll) ⇒ Object
Methods inherited from Scanner
Constructor Details
#initialize(*args) ⇒ MethodScanner
Returns a new instance of MethodScanner.
38 39 40 41 |
# File 'lib/robe/scanners.rb', line 38 def initialize(*args) super @re = /^#{Regexp.escape(@sym || "")}/ end |
Instance Method Details
#scan_methods(mod, coll) ⇒ Object
43 44 45 46 47 |
# File 'lib/robe/scanners.rb', line 43 def scan_methods(mod, coll) mod.__send__(coll, false).grep(@re) do |sym| candidates << mod.instance_method(sym) end end |