Module: Seahorse::ApiTranslator::Inflector
Instance Method Summary collapse
-
#inflect(string, format = nil) ⇒ String
Performs a very simple inflection on on the words as they are formatted in the source API configurations.
Instance Method Details
#inflect(string, format = nil) ⇒ String
Performs a very simple inflection on on the words as they are formatted in the source API configurations. These are not general case inflectors.
27 28 29 30 31 32 33 |
# File 'lib/seahorse/api_translator/inflector.rb', line 27 def inflect string, format = nil case format when 'camelCase' then string.camelize when 'snake_case' then string.underscore else string end end |