lib/nagios/zfs/zpool.rb in nagios-zfs-0.0.1 vs lib/nagios/zfs/zpool.rb in nagios-zfs-0.1.0
- old
+ new
@@ -1,8 +1,11 @@
module Nagios
module ZFS
class Zpool
+ attr_reader :name
+
def initialize(name)
+ raise 'missing pool name' if [nil, ''].include?(name)
@name = name
end
def capacity
query.split("\t").last[/^(\d+)/,1].to_i