lib/deepsecurity/screenscraping.rb
# Helper Method: Convert header string to camel cased symbol
Helper Method: Convert header string to camel cased symbol
Helper Method : Convert header string to camel cased symbol
def symbolize_header(string)
      string.
          gsub(/::/, '/').
          gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
          gsub(/([a-z\d])([A-Z])/, '\1_\2').
          gsub(/\s+/, "_").
          tr("-", "_").
          downcase.
          to_sym
    end
def symbolize_header ( string ) string . gsub ( / :: / , '/' ) . gsub ( / ([A-Z]+)([A-Z][a-z]) / , '\1_\2' ) . gsub ( / ([a-z \d ])([A-Z]) / , '\1_\2' ) . gsub ( / \s + / , "_" ) . tr ( "-" , "_" ) . downcase . to_sym end
Helper Method: Convert header string to camel cased symbol
Helper Method : Convert header string to camel cased symbol
string
<not_specific>