Method: Hieracles::Formats::Console#build_modules_line

Defined in:
lib/hieracles/formats/console.rb

#build_modules_line(key, value) ⇒ Object



113
114
115
116
117
118
119
# File 'lib/hieracles/formats/console.rb', line 113

def build_modules_line(key, value)
  length = max_key_length(@node.modules) + 3
  value_color = '%s'
  value_color = COLORS[0] if /not found/i.match value
  value_color = COLORS[2] if /\(duplicate\)/i.match value
  format("%-#{length}s #{value_color}\n", key, value)
end