devel/rubygem-term-ansicolor 1.11.2 DragonFly
Term::ANSIColor for Ruby
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- GPLv2
- Categories
- devel, ruby
- Package size
- 40.6 KiB, 145.1 KiB installed
Description
Small Ruby library that colors strings using ANSI escape sequences. It's possible to use constants:
print red, bold, "red bold", reset, "\\n"
or unary functions:
print red(bold("red bold")), "\\n"
Blockforms do also autoreset at the block's end:
print red { bold { "red bold" } }, "\\n"
It's also possible to use this module as Mixin for classes of objects that respond to :to_str, e.g. String.
class String
include Term::ANSIColor
end
print "red bold".red.bold, "\\n"
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/rubygem-term-ansicolor | 1.11.2 |
| FreeBSD | devel/rubygem-term-ansicolor | 1.11.3 |
| HardenedBSD | devel/rubygem-term-ansicolor | 1.11.3 |
| GhostBSD | devel/rubygem-term-ansicolor | 1.11.3 |
Install
Binary package:
pkg install rubygem-term-ansicolor
From DPorts:
cd /usr/dports/devel/rubygem-term-ansicolor && make install clean