lib/spf/request.rb in spf-0.0.0 vs lib/spf/request.rb in spf-0.0.1

- old
+ new

@@ -2,11 +2,11 @@ require 'spf/error' class SPF::Request - attr_reader :scope, :identity, :domain, :localpart, :ip_address, :ip_address_v6, :helo_identity, :versions + attr_reader :scope, :identity, :domain, :localpart, :ip_address, :ip_address_v6, :helo_identity, :versions, :sub_requests attr_accessor :record, :opt, :root_request, :super_request VERSIONS_FOR_SCOPE = { :helo => [1 ], :mfrom => [1, 2], @@ -31,10 +31,11 @@ @ip_address = options[:ip_address] @helo_identity = options[:helo_identity] @root_request = self @super_request = self @record = nil + @sub_requests = [] # Scope: versions_for_scope = VERSIONS_FOR_SCOPE[@scope] or raise SPF::InvalidScopeError.new("Invalid scope '#{@scope}'") @@ -116,9 +117,10 @@ def new_sub_request(options) obj = self.class.new(opt.merge(options)) obj.super_request = self obj.root_request = super_request.root_request + @sub_requests << obj return obj end def authority_domain return (@_authority_domain or @domain)