Class: Hashira::Coupling::References
- Inherits:
-
Object
- Object
- Hashira::Coupling::References
- Defined in:
- lib/hashira/coupling/references.rb
Instance Method Summary collapse
-
#initialize(roots = nil) ⇒ References
constructor
A new instance of References.
- #list(tree) ⇒ Object
- #sightings(tree) ⇒ Object
Constructor Details
#initialize(roots = nil) ⇒ References
Returns a new instance of References.
6 7 8 |
# File 'lib/hashira/coupling/references.rb', line 6 def initialize(roots = nil) @roots = roots end |
Instance Method Details
#list(tree) ⇒ Object
10 |
# File 'lib/hashira/coupling/references.rb', line 10 def list(tree) = sightings(tree).map(&:first) |
#sightings(tree) ⇒ Object
12 13 14 15 |
# File 'lib/hashira/coupling/references.rb', line 12 def sightings(tree) collect(tree) found end |