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