https://github.com/jonmagic/electric_motor
https://github.com/jonmagic/electric_motor
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jonmagic/electric_motor
- Owner: jonmagic
- Created: 2014-07-05T21:54:37.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-06T21:14:41.000Z (almost 12 years ago)
- Last Synced: 2025-01-31T13:43:48.083Z (about 1 year ago)
- Language: Ruby
- Size: 250 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Electric Motor
An electric motor and it's physics modeled in Ruby.
```ruby
motor = ElectricMotor.new
motor.running?
=> false
motor.rpm
=> 0
motor.power(true)
motor.running?
=> true
motor.rpm
=> 1000
motor.power(false)
motor.running?
=> false
motor.rpm
=> 0
```