Method: UnitMeasurements::Unit#names
- Defined in:
- lib/unit_measurements/unit.rb
#names ⇒ Array<String>
Returns an array containing the name of the unit and its aliases, sorted alphabetically.
107 108 109 |
# File 'lib/unit_measurements/unit.rb', line 107 def names (aliases + [name]).sort.freeze end |