Class: Ruber::RubyRunner::ProjectWidget

Inherits:
ProjectConfigWidget show all
Defined in:
plugins/ruby_runner/project_widget.rb

Overview

Project widget for the ruby runner plugin

Instance Attribute Summary

Attributes inherited from ProjectConfigWidget

project

Instance Method Summary (collapse)

Constructor Details

- (ProjectWidget) initialize(prj)

Creates a new instance

Parameters:



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)

Parameters:

  • value (String)

    the path of the interpreter to use



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