Class: Hashira::Coupling::EdgeMap
- Inherits:
-
Object
- Object
- Hashira::Coupling::EdgeMap
- Defined in:
- lib/hashira/coupling/edge_map.rb
Instance Method Summary collapse
- #dependencies ⇒ Object
- #evidence ⇒ Object
-
#initialize(census) ⇒ EdgeMap
constructor
A new instance of EdgeMap.
- #record(source, file, tree) ⇒ Object
- #usage ⇒ Object
Constructor Details
#initialize(census) ⇒ EdgeMap
Returns a new instance of EdgeMap.
4 5 6 |
# File 'lib/hashira/coupling/edge_map.rb', line 4 def initialize(census) @census = census end |
Instance Method Details
#dependencies ⇒ Object
8 |
# File 'lib/hashira/coupling/edge_map.rb', line 8 def dependencies = @_dependencies ||= sets |
#evidence ⇒ Object
10 |
# File 'lib/hashira/coupling/edge_map.rb', line 10 def evidence = @_evidence ||= sets |
#record(source, file, tree) ⇒ Object
14 15 16 17 18 |
# File 'lib/hashira/coupling/edge_map.rb', line 14 def record(source, file, tree) Hashira::Coupling::References.new(@census.roots).sightings(tree).each do |segments, line, nesting, home| note(@census.charge(file, home), locate(segments, nesting), segments, "#{source}:#{line}") end end |
#usage ⇒ Object
12 |
# File 'lib/hashira/coupling/edge_map.rb', line 12 def usage = @_usage ||= sets |