Class: Rabbit::Graffiti::ConfigDialog
- Inherits:
-
Object
- Object
- Rabbit::Graffiti::ConfigDialog
- Includes:
- Rabbit::GetText
- Defined in:
- lib/rabbit/graffiti/config-dialog.rb
Constant Summary
Constants included from Rabbit::GetText
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#line_width ⇒ Object
readonly
Returns the value of attribute line_width.
Instance Method Summary collapse
-
#initialize(color, line_width) ⇒ ConfigDialog
constructor
A new instance of ConfigDialog.
- #run(&block) ⇒ Object
Methods included from Rabbit::GetText
Constructor Details
#initialize(color, line_width) ⇒ ConfigDialog
Returns a new instance of ConfigDialog.
11 12 13 14 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 11 def initialize(color, line_width) @original_color = @color = color @original_line_width = @line_width = line_width end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
10 11 12 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 10 def color @color end |
#line_width ⇒ Object (readonly)
Returns the value of attribute line_width.
10 11 12 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 10 def line_width @line_width end |
Instance Method Details
#run(&block) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 16 def run(&block) @callback = block init_dialog if @dialog.run != Gtk::Dialog::RESPONSE_OK @callback.call(@original_color, @original_line_width) end @dialog.destroy end |