Class: FlightControlTower::ControlTower
- Inherits:
-
Object
- Object
- FlightControlTower::ControlTower
- Defined in:
- lib/flight-control-tower.rb
Instance Method Summary collapse
-
#initialize(config_file) ⇒ ControlTower
constructor
A new instance of ControlTower.
- #report_traffic ⇒ Object
Constructor Details
#initialize(config_file) ⇒ ControlTower
Returns a new instance of ControlTower.
7 8 9 |
# File 'lib/flight-control-tower.rb', line 7 def initialize(config_file) @config_file = config_file end |
Instance Method Details
#report_traffic ⇒ Object
11 12 13 14 15 16 |
# File 'lib/flight-control-tower.rb', line 11 def report_traffic config = YAML.load_file(@config_file) files_to_parse = Dir[config["include_pattern"]] - Dir[config["exclude_pattern"]] graph = Parser.parse(files_to_parse) View.new(graph).build end |