abacha/s10-mod — Issue #14: Issue with Dijkstra
Author: sandal
Created: 2012-01-22 03:01:28+00:00
State: open

1) This should be in a namespace, i.e. the file should be in _lib/risk_calculator/dijkstra.rb_, and the class name should be wrapped in a module like:

```ruby
module RiskCalculator
class Dijkstra
end
end
```

The details about this are in the [s10-notes about code structure](https://github.com/mendicant-university/s10-notes/blob/master/code_structure.md)

2) Your `initialize` method is listed under your private methods. However, Ruby will automatically make `initialize` private no matter where you put it in your file. Since it is something that all your instance methods depend on, the standard place to put it is directly above the rest of your instance method definitions (i.e. right above `def add_path` in this case). Placing it down under the `private` keyword makes it easy to miss for the code reader.