Class: Hubspot::Helpers::CamelCase
- Inherits:
-
Object
- Object
- Hubspot::Helpers::CamelCase
- Defined in:
- lib/hubspot/helpers/camel_case.rb
Instance Method Summary collapse
Instance Method Details
#format(string) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/hubspot/helpers/camel_case.rb', line 4 def format(string) case string when 'oauth' 'OAuth' when 'gdpr_api' 'GDPRApi' when 'public_smtp_tokens_api' 'PublicSMTPTokensApi' else string.split('_').collect(&:capitalize).join end end |