Sha256: d9dcc1fd6b90e2554f2455aecec2258a599b6732335475d9909529b7a58eedb6

Contents?: true

Size: 200 Bytes

Versions: 5

Compression:

Stored size: 200 Bytes

Contents

# coding: utf-8
#

module Githelp
  def numbers(argv=ARGV)
    a = []
    argv.each { |arg|
      if arg =~ /^(\d+)[^\d]*$/ then
        a << $1
      end
    }
    a.length > 0 ? a : ['1']
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
githelp-0.1.4 lib/githelp/numbers.rb
githelp-0.1.3 lib/githelp/numbers.rb
githelp-0.1.2 lib/githelp/numbers.rb
githelp-0.1.1 lib/githelp/numbers.rb
githelp-0.1.0 lib/githelp/numbers.rb