module Helpers
Rails-style string helpers
Public Instance Methods
camelize()
click to toggle source
# File lib/oro/helpers.rb, line 4 def camelize dup.split(/_/).map(&:capitalize).join('') # Modified from: http://yehudakatz.com/2010/11/30/ruby-2-0-refinements-in-practice/ end
underscore()
click to toggle source
Not presently used
# File lib/oro/helpers.rb, line 9 def underscore gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z])/, '\1_\2').tr('-', '_').downcase end