Module | Hirb::Util |
In: |
lib/hirb/util.rb
|
Group of handy utility functions used throughout Hirb.
Returns a constant like Module#const_get no matter what namespace it‘s nested in. Returns nil if the constant is not found.
Used by Hirb::Menu to select items from an array. Array counting starts at 1. Ranges of numbers are specified with a ’-’ or ’..’. Multiple ranges can be comma delimited. Anything that isn‘t a valid number is ignored. All elements can be returned with a ’*’. Examples:
1-3,5-6 -> [1,2,3,5,6] * -> all elements in array '' -> []