
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Gem to convert your values to SI
Add this line to your application's Gemfile:
gem 'siconvert'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install siconvert
At the moment, the gem has 2 main methods - "fromsi", "si".
Gem works with measurements of distance, mass and speed.
distance - (inch, feet, yard, verst) - will be converted to meters.
mass (lb, ounce, drachma) - will be converted to kilograms.
speed (mph) - will be converted to kilometers per hour.
Method "fromsi" converts your SI-value in to all possible alternative values and returns an array to you.
a = Siconvert.new.fromsi(2 ,"distance")
# {"inch"=>78.74, "foot"=>6.562, "yard"=>2.188, "verst"=>0.0018744142455482662}
The value must already be specified in the SI system.
Method - "si" converts your value to SI system.
To do this, pass your value as the first argument, and a value from among those supported by this gem as the second argument.
a = Siconvert.new.si(50 ,"verst")
# 53350
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that siconvert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.