Class Test::Unit::UI::GTK2::FaultList
In: test/unit/ui/gtk2/testrunner.rb
Parent: Gtk::TreeView

Methods

add_fault   clear   get_fault   new  

Public Class methods

[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

[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

[Source]

# File test/unit/ui/gtk2/testrunner.rb, line 51
          def clear
            model.clear
          end

[Source]

# File test/unit/ui/gtk2/testrunner.rb, line 47
          def get_fault(iter)
            @faults[iter.get_value(0).to_i]
          end

[Validate]

ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.