https://github.com/matussn/temp_converter_gem
convert temperatures
https://github.com/matussn/temp_converter_gem
gem ruby ruby-gem ruby-on-rails rubygems temperature-converter
Last synced: 9 months ago
JSON representation
convert temperatures
- Host: GitHub
- URL: https://github.com/matussn/temp_converter_gem
- Owner: MatusSN
- Created: 2023-04-28T20:28:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-08T12:25:53.000Z (about 3 years ago)
- Last Synced: 2025-03-23T06:16:32.155Z (over 1 year ago)
- Topics: gem, ruby, ruby-gem, ruby-on-rails, rubygems, temperature-converter
- Language: Ruby
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TempConverterGem
**THIS GEM WILL NOT RECEIVE FUTURE UPDATES.**
## Installation
Install the gem and add to the application's Gemfile by executing:
$ bundle add temp_converter_gem
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install temp_converter_gem
## Usage
```ruby
# accepted scales -> :kelvin, :celsius, :fahrenheit
require 'temp_converter_gem'
# Convert 68 degrees Fahrenheit to Celsius
celsius = TempConverterGem::Convert.to_celsius(:fahrenheit, 68)
puts "68 degrees Fahrenheit is #{celsius} degrees Celsius"
# Convert 20 degrees Celsius to Fahrenheit
fahrenheit = TempConverterGem::Convert.to_fahrenheit(:celsius, 20)
puts "20 degrees Celsius is #{fahrenheit} degrees Fahrenheit"
# Convert 0 degrees Celsius to Kelvin
kelvin = TempConverterGem::Convert.to_kelvin(:celsius, 0)
puts "0 degrees Celsius is #{kelvin} Kelvin"
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/MatusSN/temp_converter_gem