class Widgets::Uptime
A widget that executes ‘uptime`
Public Class Methods
Source
# File src/widgets/uptime.rb, line 6 def initialize options options[:interval] ||= 1 super @label = Gtk::Label.new '' init_timer append @label end
Calls superclass method
Widgets::Widget::new
Public Instance Methods
Source
# File src/widgets/uptime.rb, line 13 def update @label.set_text `uptime`.chomp end