module StringWizard

Constants

DATE_FORMATS

Public Class Methods

escape_special_characters(string) click to toggle source
# File lib/gooddata_marketo/helpers/stringwizard.rb, line 26
def escape_special_characters string
  pattern = /(\'|\*|\-|\\)/
  m = string.gsub(pattern){|match|""  + match}
  m.gsub("\n","")
end
time(unparsed_time) click to toggle source
# File lib/gooddata_marketo/helpers/stringwizard.rb, line 8
def time unparsed_time
  Time.parse(unparsed_time).to_s
  # DATE_FORMATS.each do |format|
  #   begin
  #     @time_string = Date.strptime(unparsed_time, format)
  #   rescue
  #     next
  #   end
  # end
  #
  # if @time_string.to_s.empty?
  #   nil
  # else
  #   @time_string.to_s
  # end

end