This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension StringExtensions on String { | |
| /// 문자열을 스네이크 케이스로 변환하는 `toSnakeCase()` 메서드를 사용하여 [String] 클래스를 확장 | |
| /// | |
| /// 스네이크 케이스는 단어는 밑줄(`_`)로 구분하고 모든 문자는 소문자로 구분하는 명명 규칙입니다. | |
| /// 이 메서드는 문자열의 문자를 반복하여 문자열의 시작 부분에 없는 대문자 앞에 밑줄을 추가하고 모든 문자를 소문자로 변환 | |
| /// | |
| /// Example: | |
| /// ```dart | |
| /// 'HelloWorld'.toSnakeCase(); // 'hello_world' | |
| /// 'XMLHTTPRequest'.toSnakeCase(); // 'xmlhttp_request' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # this function will check if .ruby-version file exists | |
| function set_ruby() { | |
| if [ -f ".ruby-version" ]; then | |
| version=$(cat .ruby-version) | |
| if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
| brew_ruby=$("$HOMEBREW_PREFIX/opt/ruby/bin/ruby" --version) | |
| if [[ $brew_ruby =~ $version ]]; then | |
| echo "💎 now using homebrew version ($version) of Ruby." |