Class: String
Overview
class FalseClass
Instance Method Summary collapse
Instance Method Details
#snake_case ⇒ Object
62 63 64 65 66 |
# File 'lib/crackoid/core_extensions.rb', line 62 def snake_case return self.downcase if self =~ /^[A-Z]+$/ self.gsub(/([A-Z]+)(?=[A-Z][a-z]?)|\B[A-Z]/, '_\&') =~ /_*(.*)/ return $+.downcase end |