lib/olaf/service_swagger.rb
def snake_case(s)
      s = s.to_s
      return s.downcase if s.match(/\A[A-Z]+\z/)
      s.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
        gsub(/([a-z])([A-Z])/, '\1_\2').
        downcase
    end
# snake_case and camel_case implementations stolen from extlib 0.9.15
snake_case and camel_case implementations stolen from extlib 0.9.15
snake_case and camel_case implementations stolen from extlib 0 . 9 . 15
def snake_case(s)
      s = s.to_s
      return s.downcase if s.match(/\A[A-Z]+\z/)
      s.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
        gsub(/([a-z])([A-Z])/, '\1_\2').
        downcase
    end
def snake_case ( s ) s = s . to_s return s . downcase if s . match ( / \A [A-Z]+ \z / ) s . gsub ( / ([A-Z]+)([A-Z][a-z]) / , '\1_\2' ) . gsub ( / ([a-z])([A-Z]) / , '\1_\2' ) . downcase end
snake_case and camel_case implementations stolen from extlib 0.9.15
snake_case and camel_case implementations stolen from extlib 0 . 9 . 15
s