README.md in ruby-measurement-1.2.3 vs README.md in ruby-measurement-1.3.0
- old
+ new
@@ -1,8 +1,8 @@
# Measurement
-[![Build Status](https://secure.travis-ci.org/mhuggins/ruby-measurement.png)](http://travis-ci.org/mhuggins/ruby-measurement)
+[![Build Status](https://github.com/mhuggins/ruby-measurement/actions/workflows/CI.yml/badge.svg)](https://github.com/mhuggins/ruby-measurement/actions/workflows/CI.yml)
[![Code Climate](https://codeclimate.com/github/mhuggins/ruby-measurement.png)](https://codeclimate.com/github/mhuggins/ruby-measurement)
[ruby-measurement](https://github.com/mhuggins/ruby-measurement) is a simple
Ruby gem for calculating and converting units of measure.
@@ -106,28 +106,28 @@
To include just one of these systems of measure, require the gem in per the
following.
require 'ruby-measurement/measurement'
-
+
# Metric units/conversions
require 'ruby-measurement/definitions/metric'
-
+
# U.S. customary units/conversions
require 'ruby-measurement/definitions/us_customary'
Additionally, specific categories of units of measure can be included per
system.
require 'ruby-measurement/measurement'
-
+
# Metric units/conversions
require 'ruby-measurement/definitions/metric/area'
require 'ruby-measurement/definitions/metric/length'
require 'ruby-measurement/definitions/metric/volume'
require 'ruby-measurement/definitions/metric/weight'
-
+
# U.S. customary units/conversions
require 'ruby-measurement/definitions/us_customary/area'
require 'ruby-measurement/definitions/us_customary/length'
require 'ruby-measurement/definitions/us_customary/volume'
require 'ruby-measurement/definitions/us_customary/weight'
@@ -140,17 +140,17 @@
Measurement.define(:day) do |unit|
unit.alias :days
unit.convert_to(:week) { |value| value / 7.0 }
unit.convert_to(:year) { |value| value / 365.0 }
end
-
+
Measurement.define(:wk) do |unit|
unit.alias :week, :weeks
unit.convert_to(:day) { |value| value * 7.0 }
unit.convert_to(:year) { |value| value / 52.0 }
end
-
+
Measurement.define(:yr) do |unit|
unit.alias :year, :years
unit.convert_to(:day) { |value| value * 365.0 }
unit.convert_to(:week) { |value| value * 52.0 }
end
@@ -164,10 +164,10 @@
### List all units names defined
List all keys you can use as unit
- Measurement.names # => ['count','doz','dozen',...]
+ Measurement::Unit.names # => ['count','doz','dozen',...]
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)