Sha256: 5997225bb049ad533a85f5dbf2d2d725533123c305603086648ba9563e2a3e87
Contents?: true
Size: 543 Bytes
Versions: 4
Compression:
Stored size: 543 Bytes
Contents
class RubyText::Effects # dumb name? Modes = {bold: X::A_BOLD, normal: X::A_NORMAL, reverse: X::A_REVERSE, under: X::A_UNDERLINE} Others = %[:show, :hide] # show/hide cursor; more later?? attr_reader :value, :fg def initialize(win, *args) bits = 0 @list = args args.each do |arg| if Modes.keys.include?(arg) val = Modes[arg] bits |= val elsif ::Colors.include?(arg) @fg = arg # symbol end end @value = bits end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubytext-0.0.73 | lib/effects.rb |
rubytext-0.0.72 | lib/effects.rb |
rubytext-0.0.71 | lib/effects.rb |
rubytext-0.0.70 | lib/effects.rb |