Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/robit/plugins/alias_nick.rb
Instance Method Summary collapse
-
#downcase_and_snakify ⇒ Object
Like a downcase, de-camelcaser: test => test Test => test OpsOnly => ops_only.
Instance Method Details
#downcase_and_snakify ⇒ Object
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 |