Sha256: 10a53faea683a7b8713ae0f25a268324b8b29ea424fc3ace83c4c656237856b6

Contents?: true

Size: 464 Bytes

Versions: 20

Compression:

Stored size: 464 Bytes

Contents

#!/usr/bin/env ruby
# encoding: utf-8

# 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"

puts "Using: #{HighLine.default_instance.class}"
puts

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

say("Grades:")
pp grades

Version data entries

20 entries across 19 versions & 3 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/highline-3.1.1/examples/asking_for_arrays.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/highline-3.1.1/examples/asking_for_arrays.rb
highline-3.1.2 examples/asking_for_arrays.rb
highline-3.1.1 examples/asking_for_arrays.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/highline-3.0.1/examples/asking_for_arrays.rb
highline-3.1.0 examples/asking_for_arrays.rb
highline-3.0.1 examples/asking_for_arrays.rb
highline-3.0.0 examples/asking_for_arrays.rb
highline-3.0.0.pre.1 examples/asking_for_arrays.rb
highline-2.1.0 examples/asking_for_arrays.rb
highline-2.0.3 examples/asking_for_arrays.rb
highline-2.0.2 examples/asking_for_arrays.rb
highline-2.0.1 examples/asking_for_arrays.rb
highline-2.0.0 examples/asking_for_arrays.rb
highline-2.0.0.pre.develop.16 examples/asking_for_arrays.rb
highline-2.0.0.pre.develop.15 examples/asking_for_arrays.rb
highline-2.0.0.pre.develop.14 examples/asking_for_arrays.rb
highline-2.0.0.pre.develop.13 examples/asking_for_arrays.rb
highline-2.0.0.pre.develop.12 examples/asking_for_arrays.rb
highline-2.0.0.pre.develop.11 examples/asking_for_arrays.rb