Class: Object

Inherits:
BasicObject
Defined in:
dragon/log.rb

Instance Method Summary collapse

Instance Method Details

#log(*args) ⇒ Object


170
171
172
# File 'dragon/log.rb', line 170

def log *args
  GTK::Log.puts(*args)
end

#log_black(*args) ⇒ Object


185
186
187
# File 'dragon/log.rb', line 185

def log_black *args
  log_with_color XTERM_COLOR[:black], *args
end

#log_blue(*args) ⇒ Object


201
202
203
# File 'dragon/log.rb', line 201

def log_blue *args
  log_with_color XTERM_COLOR[:blue], *args
end

#log_bright_black(*args) ⇒ Object


217
218
219
# File 'dragon/log.rb', line 217

def log_bright_black *args
  log_with_color XTERM_COLOR[:bright_black], *args
end

#log_bright_blue(*args) ⇒ Object


233
234
235
# File 'dragon/log.rb', line 233

def log_bright_blue *args
  log_with_color XTERM_COLOR[:bright_blue], *args
end

#log_bright_cyan(*args) ⇒ Object


241
242
243
# File 'dragon/log.rb', line 241

def log_bright_cyan *args
  log_with_color XTERM_COLOR[:bright_cyan], *args
end

#log_bright_green(*args) ⇒ Object


225
226
227
# File 'dragon/log.rb', line 225

def log_bright_green *args
  log_with_color XTERM_COLOR[:bright_green], *args
end

#log_bright_magenta(*args) ⇒ Object


237
238
239
# File 'dragon/log.rb', line 237

def log_bright_magenta *args
  log_with_color XTERM_COLOR[:bright_magenta], *args
end

#log_bright_red(*args) ⇒ Object


221
222
223
# File 'dragon/log.rb', line 221

def log_bright_red *args
  log_with_color XTERM_COLOR[:bright_red], *args
end

#log_bright_white(*args) ⇒ Object


245
246
247
# File 'dragon/log.rb', line 245

def log_bright_white *args
  log_with_color XTERM_COLOR[:bright_white], *args
end

#log_bright_yellow(*args) ⇒ Object


229
230
231
# File 'dragon/log.rb', line 229

def log_bright_yellow *args
  log_with_color XTERM_COLOR[:bright_yellow], *args
end

#log_cyan(*args) ⇒ Object


209
210
211
# File 'dragon/log.rb', line 209

def log_cyan *args
  log_with_color XTERM_COLOR[:cyan], *args
end

#log_error(*args) ⇒ Object


249
250
251
# File 'dragon/log.rb', line 249

def log_error *args
  GTK::Log.puts_error(*args)
end

#log_green(*args) ⇒ Object


193
194
195
# File 'dragon/log.rb', line 193

def log_green *args
  log_with_color XTERM_COLOR[:green], *args
end

#log_important(*args) ⇒ Object


166
167
168
# File 'dragon/log.rb', line 166

def log_important *args
  GTK::Log.puts_important(*args)
end

#log_info(*args) ⇒ Object


253
254
255
# File 'dragon/log.rb', line 253

def log_info *args
  GTK::Log.puts_info(*args)
end

#log_magenta(*args) ⇒ Object


205
206
207
# File 'dragon/log.rb', line 205

def log_magenta *args
  log_with_color XTERM_COLOR[:magenta], *args
end

#log_once(*ids, message) ⇒ Object


257
258
259
# File 'dragon/log.rb', line 257

def log_once *ids, message
  GTK::Log.puts_once(*ids, message)
end

#log_once_info(*ids, message) ⇒ Object


261
262
263
# File 'dragon/log.rb', line 261

def log_once_info *ids, message
  GTK::Log.puts_once_info(*ids, message)
end

#log_print(*args) ⇒ Object


162
163
164
# File 'dragon/log.rb', line 162

def log_print *args
  GTK::Log.print(*args)
end

#log_red(*args) ⇒ Object


189
190
191
# File 'dragon/log.rb', line 189

def log_red *args
  log_with_color XTERM_COLOR[:red], *args
end

#log_reset_colorObject


181
182
183
# File 'dragon/log.rb', line 181

def log_reset_color
  log_print XTERM_COLOR[:reset]
end

#log_white(*args) ⇒ Object


213
214
215
# File 'dragon/log.rb', line 213

def log_white *args
  log_with_color XTERM_COLOR[:white], *args
end

#log_with_color(xterm_escape_code, *args) ⇒ Object


174
175
176
177
178
179
# File 'dragon/log.rb', line 174

def log_with_color xterm_escape_code, *args
  log_print xterm_escape_code
  log(*args)
ensure
  log_reset_color
end

#log_yellow(*args) ⇒ Object


197
198
199
# File 'dragon/log.rb', line 197

def log_yellow *args
  log_with_color XTERM_COLOR[:yellow], *args
end