Class: Rabbit::Graffiti::ConfigDialog
- Inherits:
-
Object
- Object
- Rabbit::Graffiti::ConfigDialog
- Defined in:
- lib/rabbit/graffiti/config-dialog.rb
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
Constructor Details
#initialize(color, line_width) ⇒ ConfigDialog
Returns a new instance of ConfigDialog.
9 10 11 12 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 9 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.
8 9 10 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 8 def color @color end |
#line_width ⇒ Object (readonly)
Returns the value of attribute line_width.
8 9 10 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 8 def line_width @line_width end |
Instance Method Details
#run(&block) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/rabbit/graffiti/config-dialog.rb', line 14 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 |