Skip to content

Gem to add typewriter effects on Ruby console output.

License

Notifications You must be signed in to change notification settings

CJGlitter/typewrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Typewrite

Gem Version

Typewrite is a Ruby library that prints console messages "typewriter" style, or letter-by-letter.

Installation

#Installing as Ruby gem
$gem install typewrite

#Cloning the repsository
$git clone git@github.com:CJGlitter/typewrite.git

Usage

require "typewrite"
Typewrite.write("Your message here!")

Options

The variable options include type rate, pause length, and whether or not a newline is desired at the end of each message. By default, the type rate is one character per 0.1 second with a 1.5 second pause after each punctuation character ['.','?','!'] with a new line after each message.

You can adjust the type rate and pause length with integers and turn off the newlines by passing integers and a boolean respectively.

Example

message = "Here's your message"
Typewrite.write(message, 0.05, 0, false)

That would result in a message that types a character every 0.05 seconds with no punctuation pauses and no newlines after each message.

Versioning

Typewrite follows the Semantic Versioning standard.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/CJGlitter/typewrite

License

Copywrite ©Cory Davis 2023

https://cjglitter.com

Released under the MIT license. See LICENSE file for details.

About

Gem to add typewriter effects on Ruby console output.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages