Class: Looksee::LookupPath::Entry
- Inherits:
-
Object
- Object
- Looksee::LookupPath::Entry
- Includes:
- Enumerable
- Defined in:
- lib/looksee/lookup_path.rb
Overview
An entry in the LookupPath.
Instance Attribute Summary collapse
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
-
#module ⇒ Object
readonly
Returns the value of attribute module.
Instance Method Summary collapse
-
#each(&block) ⇒ Object
Yield each method in alphabetical order along with its visibility (:public, :private, :protected, :undefined, or :overridden).
-
#initialize(mod, overridden) ⇒ Entry
constructor
A new instance of Entry.
- #overridden?(name) ⇒ Boolean
Constructor Details
#initialize(mod, overridden) ⇒ Entry
Returns a new instance of Entry.
59 60 61 62 63 |
# File 'lib/looksee/lookup_path.rb', line 59 def initialize(mod, overridden) @module = mod @methods = find_methods @overridden = overridden end |
Instance Attribute Details
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
65 66 67 |
# File 'lib/looksee/lookup_path.rb', line 65 def methods @methods end |
#module ⇒ Object (readonly)
Returns the value of attribute module.
65 66 67 |
# File 'lib/looksee/lookup_path.rb', line 65 def module @module end |
Instance Method Details
#each(&block) ⇒ Object
Yield each method in alphabetical order along with its visibility (:public, :private, :protected, :undefined, or :overridden).
76 77 78 |
# File 'lib/looksee/lookup_path.rb', line 76 def each(&block) @methods.sort.each(&block) end |
#overridden?(name) ⇒ Boolean
67 68 69 |
# File 'lib/looksee/lookup_path.rb', line 67 def overridden?(name) @overridden.include?(name.to_s) end |