module BioTable::Formatter
Public Class Methods
strip_quotes(list)
click to toggle source
# File lib/bio-table/formatter.rb, line 20 def Formatter::strip_quotes list list.map { |field| if field == nil nil else first = field[0,1] if first == "\"" or first == "'" last = field[-1,1] if first == last field = field[1..-2] end end field end } end
transform_header_ids(modify, list)
click to toggle source
# File lib/bio-table/formatter.rb, line 4 def Formatter::transform_header_ids modify, list l = list.dup case modify when :downcase then l.map { |h| h.downcase } when :upcase then l.map { |h| h.upcase } else l end end
transform_row_ids(modify, list)
click to toggle source
# File lib/bio-table/formatter.rb, line 12 def Formatter::transform_row_ids modify, list l = list.dup case modify when :downcase then l[0].downcase! when :upcase then l[0].upcase! end l end