Method: Jsus::Container#output_cycles
- Defined in:
- lib/jsus/container.rb
#output_cycles(graph) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/jsus/container.rb', line 173 def output_cycles(graph) cycles = graph.cycles error_msg = [] unless cycles.empty? error_msg << "Jsus has discovered you have circular dependencies in your code." error_msg << "Please resolve them immediately!" error_msg << "List of circular dependencies:" cycles.each do |cycle| error_msg << "-" * 30 error_msg << (cycle + [cycle.first]).map {|sf| sf.filename}.join(" => ") end error_msg << "-" * 30 error_msg = error_msg.join("\n") Jsus.logger.fatal(error_msg) end end |