Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/robit/plugins/alias_nick.rb

Instance Method Summary collapse

Instance Method Details

#downcase_and_snakifyObject

Like a downcase, de-camelcaser: test => test Test => test OpsOnly => ops_only



10
11
12
# File 'lib/robit/plugins/alias_nick.rb', line 10

def downcase_and_snakify
  self.gsub(/\s+/,'').gsub(/([A-Z])/, '_\1').gsub('-','_').delete('@').sub(/^_/, '').downcase
end