Method: LogObject.map

Defined in:
lib/opensecret/plugins.io/logs/log.object.rb

.map(the_map) ⇒ Object

– – Log map with a key-value pair on each line. – – Parameter – the_map : the map to log – – Dependencies and Assumptions – the map has been instantiated (not nil) –



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/opensecret/plugins.io/logs/log.object.rb', line 69

def self.map the_map

  return if the_map.nil?

  log.debug(ere) { "# --- ----------------------------------------------" }
  log.debug(ere) { "# --- Map has [#{the_map.length}] key/value pairs." }
  log.debug(ere) { "# --- ----------------------------------------------" }

  the_map.each do |the_key, the_value|

    padded_key = sprintf '%-33s', the_key
    log.debug(ere) { "# --- #{padded_key} => #{the_value}" }

  end

  log.debug(ere) { "# --- ----------------------------------------------" }

end