module Cutter::ColoredOutputs::ClassMethods
Public Instance Methods
colors() { |colors_config| ... }
click to toggle source
# File lib/cutter/colored_outputs.rb, line 33 def colors &block yield colors_config end
colors?()
click to toggle source
# File lib/cutter/colored_outputs.rb, line 28 def colors? @colors_state ||= :on @colors_state == :on end
colors_config()
click to toggle source
# File lib/cutter/colored_outputs.rb, line 37 def colors_config @colors ||= { # Colors for #stamper :line => :blue, :time => :light_blue, :message_name => :cyan, :message_line => :cyan, :total_line => :yellow, :total_count => :yellow, # Colors for #inspect! # :called_from => :light_magenta, :class_name => :light_green, :method => :red, :method_name => :yellow, # :source => :white, # :source_path => :white, # :source_number => :white, # :lv => :blue, # :lv_names => :magenta, # :lv_values => :light_red, # :iv => :cyan, :iv_names => :cyan, :iv_values => :light_blue, :self_inspection => :red, :self_inspection_trace => :blue, :caller_methods => :red, :caller_method => :green } end
turn_colors(state = :on)
click to toggle source
# File lib/cutter/colored_outputs.rb, line 24 def turn_colors state = :on @colors_state = state end