Class: Hashira::Coupling::References

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/coupling/references.rb

Instance Method Summary collapse

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