class Serverspec::Type::Zfs

Public Instance Methods

exists?() click to toggle source
# File lib/serverspec/type/zfs.rb, line 3
def exists?
  @runner.check_zfs_exists(@name)
end
has_property?(property) click to toggle source
# File lib/serverspec/type/zfs.rb, line 7
def has_property?(property)
  @runner.check_zfs_has_property(@name, property)
end
property() click to toggle source
# File lib/serverspec/type/zfs.rb, line 15
def property
  get_property if @property.nil?
  @property
end
to_s() click to toggle source
# File lib/serverspec/type/zfs.rb, line 11
def to_s
  'ZFS'
end

Private Instance Methods

get_property() click to toggle source
# File lib/serverspec/type/zfs.rb, line 21
def get_property
  @property = Hash.new
  @runner.get_zfs_property(@name).stdout.split(/\n/).each do |line|
    property, value = line.split(/\s+/)
    @property[property] = value
  end
end