module Sunspot::Util

Public Class Methods

method_case(string_or_symbol) click to toggle source
# File lib/sunspot/sunspot_spellcheck.rb, line 87
def method_case(string_or_symbol)
  string = string_or_symbol.to_s
  first = true
  string.split('_').map! do |word|
    word = first ? word : word.capitalize
    first = false
    word
  end.join
end