Module: Sinatra::ParamValidator::Camelize

Included in:
Sinatra::ParamValidator, Parameter, Rule
Defined in:
lib/sinatra/param_validator/camelize.rb

Overview

Helpers for validating parameters

Instance Method Summary collapse

Instance Method Details

#camelize(symbol) ⇒ Object



7
8
9
# File 'lib/sinatra/param_validator/camelize.rb', line 7

def camelize(symbol)
  symbol.to_s.split('_').map(&:capitalize).join
end