class ZerigoDNS::Zone < ZerigoDNS::Client include ZerigoDNS::Resource class < e raise unless e.response.code.not_found? create(:domain=> domain, :ns_type=>'pri_sec') end end # Get count of all hosts belonging to this zone # @return [Fixnum] Count of all hosts belonging to this zone. def count_hosts get("zones/#{id}/hosts/count.xml").body['count'].to_i end end