Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/fwtoolkit/tasks.rb

Overview

monkey patching string to add the ruby_format method used in frank:model tasks

Instance Method Summary collapse

Instance Method Details

#ruby_formatObject



17
18
19
# File 'lib/fwtoolkit/tasks.rb', line 17

def ruby_format 
  self.gsub(/(.)([A-Z])/,'\1_\2').downcase
end

#ruby_format!Object



21
22
23
# File 'lib/fwtoolkit/tasks.rb', line 21

def ruby_format!  
  replace ruby_format  
end