Module: Tick::InstanceMethods

Defined in:
lib/tick.rb

Instance Method Summary collapse

Instance Method Details

#_colorize_desc(str) ⇒ Object



123
124
125
126
127
128
129
# File 'lib/tick.rb', line 123

def _colorize_desc(str) 
  if Tick.desc_color 
    str.color(Tick.desc_color)
  else
    str.bright.foreground(:yellow)
  end
end

#_colorize_time(str) ⇒ Object



131
132
133
134
135
136
137
# File 'lib/tick.rb', line 131

def _colorize_time(str)
  if Tick.time_color 
    str.color(Tick.time_color)
  else
    str.underline.foreground(:cyan).bright
  end
end

#_log_benchmark(desc, time) ⇒ Object



116
117
118
119
120
121
# File 'lib/tick.rb', line 116

def _log_benchmark(desc, time)
  message = self._colorize_desc(desc)
  message << "  "
  message << self._colorize_time(time)
  Tick.logger.debug(message)
end