Class: Dorian::Times

Inherits:
Object
  • Object
show all
Defined in:
lib/dorian/times.rb

Class Method Summary collapse

Class Method Details

.runObject



5
6
7
8
9
10
11
12
# File 'lib/dorian/times.rb', line 5

def self.run
  if ARGV.size != 1 || ARGV[0] == "--help" || ARGV[0] == "-h"
    puts "USAGE: times N"
    exit
  end

  ARGV.first.to_i.times { |i| puts i + 1 }
end