Sha256: 668e40ed0071acbed336daf43f7087fc2a2e9e86a84aff863e313ab2e4b6be71

Contents?: true

Size: 403 Bytes

Versions: 144

Compression:

Stored size: 403 Bytes

Contents

#!/usr/local/bin/ruby -w

# asking_for_arrays.rb
#
#  Created by James Edward Gray II on 2005-07-05.
#  Copyright 2005 Gray Productions. All rights reserved.

require "rubygems"
require "highline/import"
require "pp"

grades = ask( "Enter test scores (or a blank line to quit):",
              lambda { |ans| ans =~ /^-?\d+$/ ? Integer(ans) : ans} ) do |q|
  q.gather = ""
end

say("Grades:")
pp grades

Version data entries

144 entries across 140 versions & 15 rubygems

Version Path
delano-rye-0.6.2 vendor/highline-1.5.1/examples/asking_for_arrays.rb
delano-rye-0.6.3 vendor/highline-1.5.1/examples/asking_for_arrays.rb
delano-rye-0.6.4 vendor/highline-1.5.1/examples/asking_for_arrays.rb
malysz87-highline-1.5.10 examples/asking_for_arrays.rb
malysz87-highline-1.5.11 examples/asking_for_arrays.rb
malysz87-highline-1.5.4 examples/asking_for_arrays.rb
malysz87-highline-1.5.5 examples/asking_for_arrays.rb
solutious-rudy-0.6.0 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.1 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.2 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.3 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.4 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.5 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.6 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.7 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.6.8 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.7.0 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.7.1 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.7.2 vendor/highline-1.5.1/examples/asking_for_arrays.rb
solutious-rudy-0.7.3 vendor/highline-1.5.1/examples/asking_for_arrays.rb