diff options
-rw-r--r-- | README.md | 61 | ||||
-rw-r--r-- | README.rdoc | 63 | ||||
-rw-r--r-- | Rakefile | 4 |
3 files changed, 65 insertions, 63 deletions
diff --git a/README.md b/README.md deleted file mode 100644 index 628629b..0000000 --- a/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Read Me -by James Edward Gray II - -## Description -Welcome to HighLine. - -HighLine was designed to ease the tedious tasks of doing console input and -output with low-level methods like gets() and puts(). HighLine provides a -robust system for requesting data from a user, without needing to code all the -error checking and validation rules and without needing to convert the typed -Strings into what your program really needs. Just tell HighLine what you're -after, and let it do all the work. - -### Documentation - -See HighLine and HighLine::Question for documentation. - -#### Examples - -Basic usage: - - ask("Company? ") { |q| q.default = "none" } - -Validation: - - ask("Age? ", Integer) { |q| q.in = 0..105 } - ask("Name? (last, first) ") { |q| q.validate = /\A\w+, ?\w+\Z/ } - -Type conversion for answers: - - ask("Birthday? ", Date) - ask("Interests? (comma sep list) ", lambda { |str| str.split(/,\s*/) }) - -Reading passwords: - - ask("Enter your password: ") { |q| q.echo = false } - ask("Enter your password: ") { |q| q.echo = "x" } - -ERb based output (with HighLine's ANSI color tools): - - say("This should be <%= color('bold', BOLD) %>!") - -Menus: - - choose do |menu| - menu.prompt = "Please choose your favorite programming language? " - - menu.choice(:ruby) { say("Good choice!") } - menu.choices(:python, :perl) { say("Not from around here, are you?") } - end - -For more examples see the examples/ directory of this project. - -#### Installing - -See the INSTALL file for instructions. - -#### Questions and/or Comments - -Feel free to email [James Edward Gray II](mailto:james@grayproductions.net) or -[Gregory Brown](mailto:gregory.t.brown@gmail.com) with any questions. diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..f28478b --- /dev/null +++ b/README.rdoc @@ -0,0 +1,63 @@ += Read Me + +by James Edward Gray II + +== Description + +Welcome to HighLine. + +HighLine was designed to ease the tedious tasks of doing console input and +output with low-level methods like gets() and puts(). HighLine provides a +robust system for requesting data from a user, without needing to code all the +error checking and validation rules and without needing to convert the typed +Strings into what your program really needs. Just tell HighLine what you're +after, and let it do all the work. + +== Documentation + +See HighLine and HighLine::Question for documentation. + +== Examples + +Basic usage: + + ask("Company? ") { |q| q.default = "none" } + +Validation: + + ask("Age? ", Integer) { |q| q.in = 0..105 } + ask("Name? (last, first) ") { |q| q.validate = /\A\w+, ?\w+\Z/ } + +Type conversion for answers: + + ask("Birthday? ", Date) + ask("Interests? (comma sep list) ", lambda { |str| str.split(/,\s*/) }) + +Reading passwords: + + ask("Enter your password: ") { |q| q.echo = false } + ask("Enter your password: ") { |q| q.echo = "x" } + +ERb based output (with HighLine's ANSI color tools): + + say("This should be <%= color('bold', BOLD) %>!") + +Menus: + + choose do |menu| + menu.prompt = "Please choose your favorite programming language? " + + menu.choice(:ruby) { say("Good choice!") } + menu.choices(:python, :perl) { say("Not from around here, are you?") } + end + +For more examples see the examples/ directory of this project. + +== Installing + +See the INSTALL file for instructions. + +== Questions and/or Comments + +Feel free to email {James Edward Gray II}[mailto:james@grayproductions.net] or +{Gregory Brown}[mailto:gregory.t.brown@gmail.com] with any questions. @@ -17,11 +17,11 @@ Rake::TestTask.new do |test| end Rake::RDocTask.new do |rdoc| - rdoc.rdoc_files.include( "README", "INSTALL", + rdoc.rdoc_files.include( "README.rdoc", "INSTALL", "TODO", "CHANGELOG", "AUTHORS", "COPYING", "LICENSE", "lib/" ) - rdoc.main = "README" + rdoc.main = "README.rdoc" rdoc.rdoc_dir = "doc/html" rdoc.title = "HighLine Documentation" end |