class TablePrint::Fingerprinter
def populate_row(prefix, hash, target)
def populate_row(prefix, hash, target) row = TablePrint::Row.new() # populate a row with the columns we handle cells = {} handleable_columns(hash).each do |method| display_method = (prefix == "" ? method : "#{prefix}.#{method}") if method.is_a? Proc cell_value = method.call(target) elsif target.is_a? Hash and target.keys.include? method.to_sym cell_value = target[method.to_sym] elsif target.is_a? Hash and target.keys.include? method cell_value = target[method] elsif target.respond_to? method cell_value ||= target.send(method) else cell_value = "Method Missing" end cells[@column_names_by_display_method[display_method]] = cell_value end row.set_cell_values(cells) end