Sha256: f2a5830c694fa3ac8656ccb0a928d72f08fe834172b4cffd4f8b473d477ea029

Contents?: true

Size: 398 Bytes

Versions: 79

Compression:

Stored size: 398 Bytes

Contents

#!/usr/bin/env ruby

# 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

79 entries across 69 versions & 11 rubygems

Version Path
brakeman-4.3.1 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/asking_for_arrays.rb
brakeman-4.3.0 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/asking_for_arrays.rb
brakeman-4.2.1 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/asking_for_arrays.rb
brakeman-4.2.0 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/asking_for_arrays.rb
brakeman-4.1.1 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/asking_for_arrays.rb
brakeman-4.1.0 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/asking_for_arrays.rb
highline-1.7.10 examples/asking_for_arrays.rb
brakeman-4.0.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-4.0.1.pre1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-4.0.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.7.2 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.7.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.7.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.6.2 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.6.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.6.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.5.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.4.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.4.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb
brakeman-3.3.5 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/asking_for_arrays.rb