class EventMachine::DNSBL::Zone::MemoryZone
Public Class Methods
new()
click to toggle source
# File lib/eventmachine/dnsbl/zone/memory_zone.rb, line 7 def initialize @zones = Array.new @backend = Hash.new end
Public Instance Methods
add_dnsblresource(dnsblrr)
click to toggle source
# File lib/eventmachine/dnsbl/zone/memory_zone.rb, line 12 def add_dnsblresource(dnsblrr) zone = dnsblrr[:zone] if not @backend[zone] if not @zones.include?(zone) @zones << zone @zones = @zones.uniq.sort {|a,b| b.length <=> a.length} end @backend[zone] = Array.new end @backend[zone] << dnsblrr end
get_all_records_for_zone(zone)
click to toggle source
# File lib/eventmachine/dnsbl/zone/memory_zone.rb, line 24 def get_all_records_for_zone(zone) @backend[zone] end