Module: Dread::ConsoleOutput

Defined in:
lib/dread/console_output.rb

Constant Summary collapse

INDENT_INCREASE =
4

Class Method Summary collapse

Class Method Details

.generate(dependable_collection, indent = 0) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/dread/console_output.rb', line 7

def generate(dependable_collection, indent=0)
  dependable_collection.each do |relation_name, dependables|
    indent_string = " " * indent
    puts "#{indent_string}#{relation_name}"
    generate(dependables, indent+INDENT_INCREASE) if dependables.any?
  end
end

.generate_missing(klasses_with_missing_dependables) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/dread/console_output.rb', line 15

def generate_missing(klasses_with_missing_dependables)
  klasses_with_missing_dependables.each do |klass, missing_dependables|
    puts klass
    missing_dependables.each do |missing_dependable|
      puts "  #{missing_dependable}"
    end
  end
end