-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
185 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require "../src/tput" | ||
|
||
# With own class | ||
class MyClass | ||
include Tput | ||
end | ||
my = MyClass.new(use_buffer: false) | ||
|
||
# Check whether we are running under an XTerm: | ||
p my.xterm? | ||
|
||
# Test a couple boolean capabilities | ||
p my.booleans["needs_xon_xoff"] # Same as ["nxon"] or ["nx"] | ||
p my.booleans["over_strike"] # Same as ["os"] | ||
|
||
# Print a couple numeric values | ||
p my.numbers["columns"] # Same as ["cols"] or ["co"] | ||
p my.numbers["lines"] # Same as ["lines"] or ["li"] | ||
|
||
10.times do |i| | ||
my.rmove 1, -1 | ||
my.print i.to_s | ||
sleep 0.5 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: tput | ||
version: 0.1.0 | ||
version: 0.2.0 | ||
|
||
authors: | ||
- Davor Ocelic <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.