Class: Faccts::RustCodeGenerator::RustNameToFunctionCallConverter::RustCharacterConverter
- Inherits:
-
Object
- Object
- Faccts::RustCodeGenerator::RustNameToFunctionCallConverter::RustCharacterConverter
- Defined in:
- lib/faccts/03_generating_code/rust_name_to_function_call_converter.rb
Constant Summary collapse
- WHITESPACE_CHARACTERS =
" \n\t"- ALPHANUMERIC_CHARACTERS =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_"- SUPPORTED_CHARACTERS =
"#{ALPHANUMERIC_CHARACTERS}#{WHITESPACE_CHARACTERS}".freeze
Instance Method Summary collapse
Instance Method Details
#convert!(name_character) ⇒ Object
50 51 52 53 54 55 56 57 |
# File 'lib/faccts/03_generating_code/rust_name_to_function_call_converter.rb', line 50 def convert!(name_character) @input_character = name_character return "" unless supported_character? return "_" if whitespace? name_character end |