Sha256: 1058df6a482e545da3b275f86a87f4573c152d6399ebdb4992f99cb7772c972e

Contents?: true

Size: 331 Bytes

Versions: 4

Compression:

Stored size: 331 Bytes

Contents

#!/usr/bin/env ruby -w

# limit.rb
#
#  Created by James Edward Gray II on 2008-11-12.
#  Copyright 2008 Gray Productions. All rights reserved.

require "rubygems"
require "highline/import"

puts "Using: #{$terminal.terminal.class}"
puts

text = ask("Enter text (max 10 chars): ") { |q| q.limit = 10 }
puts "You entered: #{text}!"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
highline-2.0.0.pre.develop.9 examples/limit.rb
highline-2.0.0.pre.develop.6 examples/limit.rb
highline-2.0.0.pre.develop.4 examples/limit.rb
highline-2.0.0.pre.develop.2 examples/limit.rb