Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • test/unit/ui/gtk2/testrunner.rb

Parent

Test::Unit::UI::GTK2::FaultList

Public Class Methods

new() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 25
def initialize
  @faults = []
  @model = Gtk::ListStore.new(String, String)
  super(@model)
  column = Gtk::TreeViewColumn.new
  column.visible = false
  append_column(column)
  renderer = Gtk::CellRendererText.new
  column = Gtk::TreeViewColumn.new("Failures", renderer, {:text => 1})
  append_column(column)
  selection.mode = Gtk::SELECTION_SINGLE
  set_rules_hint(true)
  set_headers_visible(false)
end
            

Public Instance Methods

add_fault(fault) click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 40
def add_fault(fault)
  @faults.push(fault)
  iter = @model.append
  iter.set_value(0, (@faults.length - 1).to_s)
  iter.set_value(1, fault.short_display)
end
            
clear() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 51
def clear
  model.clear
end
            
get_fault(iter) click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 47
def get_fault(iter)
  @faults[iter.get_value(0).to_i]
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus