Strom
Ohm's law expressed in Ruby.
Installation
Add this line to your application's Gemfile:
gem 'strom'
And then execute:
$ bundle
Or install it yourself as:
$ gem install strom
Usage
Require the gem in your project or irb
and find the unknown element:
require 'strom'
# => true
0.5.amperes.and(18.ohms)
# => 9.0 volts
18.ohms.and(9.volts)
# => 0.5 amperes
9.volts.and(0.5.amperes)
# => 18.0 ohms
Contributing
- Fork it ( https://github.com/kodnin/strom/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request