Sha256: 3b74c2a3c5a5cd3de5809ef833a28a2eda3f1e8b3b805029beb2518aaa6bf7d7
Contents?: true
Size: 478 Bytes
Versions: 3
Compression:
Stored size: 478 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require_relative '../../lib/ppcurses.rb' class String def reverse_color; "\033[7m#{self}\033[27m" end end cal = PPCurses::MetaMonth.new cal.month_str_array.each_with_index { |val, i| if i != cal.day_row puts val else num_of_digits = cal.day.day > 9 ? 2 : 1 print val[0, cal.day_col] print val[cal.day_col, num_of_digits].reverse_color puts val[cal.day_col + num_of_digits, val.length] end }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ppcurses-0.1.2 | test/date/printMetaMonth.rb |
ppcurses-0.1.1 | test/date/printMetaMonth.rb |
ppcurses-0.1.0 | test/date/printMetaMonth.rb |