module Styles
Constants
- CONSOLE_WIDTH
- REPL_OUT
- STYLES
Public Instance Methods
create_style(*styles)
click to toggle source
# File lib/replicant/styles.rb, line 36 def create_style(*styles) "\e[#{STYLES.values_at(*styles).join(';')}m" end
end_style()
click to toggle source
# File lib/replicant/styles.rb, line 40 def end_style "\e[0m" end
styled_text(text, *styles) { |else end_style end| ... }
click to toggle source
# File lib/replicant/styles.rb, line 32 def styled_text(text, *styles) create_style(*styles) + text + if block_given? then yield else end_style end end def create_style(*styles) "\e[#{STYLES.values_at(*styles).join(';')}m" end def end_style "\e[0m" end end