Class: MittensUi::FilePicker
- Inherits:
-
Object
- Object
- MittensUi::FilePicker
- Defined in:
- lib/mittens_ui/file_picker.rb
Overview
A file picker dialog that allows the user to select a file. Wraps Gtk::FileDialog. Opens immediately on instantiation. The selected path is accessible via #path after the dialog closes.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(options = {}) {|path| ... } ⇒ FilePicker
constructor
Creates a new FilePicker dialog and opens it immediately.
Constructor Details
#initialize(options = {}) {|path| ... } ⇒ FilePicker
Creates a new FilePicker dialog and opens it immediately.
28 29 30 31 |
# File 'lib/mittens_ui/file_picker.rb', line 28 def initialize( = {}, &block) @path = nil open_dialog(, &block) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
20 21 22 |
# File 'lib/mittens_ui/file_picker.rb', line 20 def path @path end |