lib/aws/ses/extensions.rb
def underscore
    gsub(/::/, '/').
      gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
      gsub(/([a-z\d])([A-Z])/,'\1_\2').
      tr("-", "_").downcase
  end
# ActiveSupport adds an underscore method to String so let's just use that one if
# we find that the method is already defined
ActiveSupport adds an underscore method to String so let's just use that one if
we find that the method is already defined
ActiveSupport adds an underscore method to String so let ' s just use that one if we find that the method is already defined
def underscore
    gsub(/::/, '/').
      gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
      gsub(/([a-z\d])([A-Z])/,'\1_\2').
      tr("-", "_").downcase
  end
def underscore gsub ( / :: / , '/' ) . gsub ( / ([A-Z]+)([A-Z][a-z]) / , '\1_\2' ) . gsub ( / ([a-z \d ])([A-Z]) / , '\1_\2' ) . tr ( "-" , "_" ) . downcase end
ActiveSupport adds an underscore method to String so let's just use that one if
we find that the method is already defined
ActiveSupport adds an underscore method to String so let ' s just use that one if we find that the method is already defined