Class: Rabbit::Logger::GUI

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/rabbit/logger/gui.rb

Constant Summary

Constants included from GetText

GetText::DOMAIN

Instance Attribute Summary collapse

Attributes included from Base

#level, #webrick_mode

Instance Method Summary collapse

Methods included from Base

#<<, #debug, #debug?, #error, #error?, #fatal, #fatal?, #info, #info?, #log, #unknown, #unknown?, #warning, #warning?

Methods included from GetText

included

Constructor Details

#initialize(level = nil, width = 450, height = 400) ⇒ GUI

Returns a new instance of GUI.



13
14
15
16
17
18
19
20
# File 'lib/rabbit/logger/gui.rb', line 13

def initialize(level=nil, width=450, height=400)
  Gtk.init
  super(*[level].compact)
  @width = width
  @height = height
  @start_gui_main_loop_automatically = false
  init_dialog
end

Instance Attribute Details

#start_gui_main_loop_automaticallyObject

Returns the value of attribute start_gui_main_loop_automatically.



12
13
14
# File 'lib/rabbit/logger/gui.rb', line 12

def start_gui_main_loop_automatically
  @start_gui_main_loop_automatically
end

Instance Method Details

#clear_bufferObject



22
23
24
# File 'lib/rabbit/logger/gui.rb', line 22

def clear_buffer
  @buffer.text = ""
end

#quitObject



26
27
28
# File 'lib/rabbit/logger/gui.rb', line 26

def quit
  @dialog.destroy
end