File: limit.rb

package info (click to toggle)
ruby-highline 1.6.13-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 616 kB
  • sloc: ruby: 4,657; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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"

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