Class: UWA::Widget::SysHd
- Inherits:
-
Handler
- Object
- Handler
- UWA::Widget::SysHd
- Defined in:
- lib/uwa_syshd/config.rb,
lib/uwa_syshd/widget.rb
Constant Summary collapse
- NAME =
'uwa_syshd'
- VERSION =
'0.3'
- COPYRIGHT =
'Copyright (C) 2007 Florent Solt'
- DESC =
'UWA system hard disk usage widget'
- AUTHOR =
'Florent Solt'
- EMAIL =
'[email protected]'
- HOMEPAGE =
'http://gnetvibes.rubyforge.org'
- LICENSE =
'BSD'
Instance Method Summary collapse
-
#initialize ⇒ SysHd
constructor
A new instance of SysHd.
- #values ⇒ Object
Constructor Details
Instance Method Details
#values ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/uwa_syshd/widget.rb', line 13 def values @values = `df -h -l -x tmpfs`.split("\n") @values.shift @values.collect! do |v| v = v.split(/\s+/) [v[5], v[4][/\d+/].to_i, v[2], v[1]] end self << JSON.unparse(@values) end |