A simple Ruby gem for input transformation and conversion. This gem provides various utility methods for text processing and data conversion.
Add this line to your application's Gemfile:
gem 'crypto_wallet_tool'And then execute:
$ bundle installOr install it yourself as:
$ gem install crypto_wallet_toolrequire 'crypto_wallet_tool'
# Convert to uppercase
CryptoWalletTool::Converter.to_uppercase("hello world")
# => "HELLO WORLD"
# Convert to lowercase
CryptoWalletTool::Converter.to_lowercase("HELLO WORLD")
# => "hello world"
# Reverse text
CryptoWalletTool::Converter.reverse("hello")
# => "olleh"
# Convert to title case
CryptoWalletTool::Converter.to_title_case("hello world")
# => "Hello World"# Convert to snake_case
CryptoWalletTool::Converter.to_snake_case("helloWorld")
# => "hello_world"
# Convert to camelCase
CryptoWalletTool::Converter.to_camel_case("hello_world")
# => "helloWorld"# Remove all whitespace
CryptoWalletTool::Converter.remove_whitespace("hello world")
# => "helloworld"
# Convert to character array
CryptoWalletTool::Converter.to_char_array("hello")
# => ["h", "e", "l", "l", "o"]
# Convert array back to string
CryptoWalletTool::Converter.array_to_string(["h", "e", "l", "l", "o"])
# => "hello"# Apply multiple transformations in sequence
CryptoWalletTool::Converter.transform("hello world", [:to_uppercase, :reverse])
# => "DLROW OLLEH"
# Chain snake_case and remove_whitespace
CryptoWalletTool::Converter.transform("HelloWorld", [:to_snake_case, :remove_whitespace])
# => "helloworld"to_uppercase(input)- Convert text to uppercaseto_lowercase(input)- Convert text to lowercasereverse(input)- Reverse the input textto_title_case(input)- Convert to title case (capitalize each word)to_snake_case(input)- Convert to snake_caseto_camel_case(input)- Convert to camelCaseremove_whitespace(input)- Remove all whitespaceto_char_array(input)- Convert string to array of charactersarray_to_string(input)- Convert array back to stringtransform(input, transformations)- Apply multiple transformations
This project is configured to run in Docker containers, eliminating the need for local Ruby installation.
# Clone the repository
git clone https://github.com/your-username/crypto_wallet_tool.git
cd crypto_wallet_tool
# Build the Docker environment
docker-compose build# Build the image
docker-compose build
# Run tests
docker-compose run --rm test
# Open Ruby console
docker-compose run --rm console
# Open shell
docker-compose run --rm app /bin/bash
# Build gem
docker-compose run --rm buildIf you prefer to run locally without Docker:
# Install dependencies
bundle install
# Run tests
bundle exec rspec
# Open console
bundle exec irb
# Build gem
bundle exec rake buildTo release a new version:
- Update the version number in
version.rb - Run
docker-compose run --rm buildto build the gem - Run
bundle exec rake releaseto create a git tag and push to rubygems.org
# Run all tests
docker-compose run --rm test# Run all tests
bundle exec rspec
# Run with coverage
bundle exec rspec --format documentationBug reports and pull requests are welcome on GitHub at https://github.com/your-username/crypto_wallet_tool.
The gem is available as open source under the terms of the MIT License.