Class: Ruber::RubyRunner::ProjectWidget
- Inherits:
-
ProjectConfigWidget
- Object
- Qt::Widget
- ProjectConfigWidget
- Ruber::RubyRunner::ProjectWidget
- Defined in:
- plugins/ruby_runner/project_widget.rb
Overview
Project widget for the ruby runner plugin
Instance Attribute Summary
Attributes inherited from ProjectConfigWidget
Instance Method Summary (collapse)
-
- (ProjectWidget) initialize(prj)
constructor
Creates a new instance.
-
- (Object) interpreter(value)
Reader for the
ruby/ruby
option.
Constructor Details
- (ProjectWidget) initialize(prj)
Creates a new instance
37 38 39 40 41 42 |
# File 'plugins/ruby_runner/project_widget.rb', line 37 def initialize prj super @ui = Ui::RubyRunnerProjectWidget.new @ui.setupUi self @ui._ruby__ruby.add_items Ruber[:config][:ruby, :interpreters] end |
Instance Method Details
- (Object) interpreter=(value)
Reader for the ruby/ruby
option
It selects the entry having text equal to value in the combo box (or the first entry if there’s no entry with text value)
52 53 54 55 56 |
# File 'plugins/ruby_runner/project_widget.rb', line 52 def interpreter= value item = @ui._ruby__ruby.each_with_index.find{|txt, i| txt == value} idx = item ? item[1] : 0 @ui._ruby__ruby.current_index = idx end |