class Coppertone::Qualifier
Instances of this class represent qualifiers, as defined by the SPF specification (see section 4.6.1).
There are only 4 qualifiers permitted by the specification, so this class does not allow the creation of new instances. These fixed instances should be accessed through either the class level constants or the qualifiers class method.
Constants
- DEFAULT_QUALIFIER_TEXT
- FAIL
- NEUTRAL
- PASS
- SOFTFAIL
Attributes
result_code[R]
text[R]
Public Class Methods
default_qualifier()
click to toggle source
# File lib/coppertone/qualifier.rb, line 20 def self.default_qualifier find_by_text(nil) end
find_by_text(text)
click to toggle source
# File lib/coppertone/qualifier.rb, line 15 def self.find_by_text(text) text = DEFAULT_QUALIFIER_TEXT if text.blank? @qualifier_hash[text] end
qualifiers()
click to toggle source
# File lib/coppertone/qualifier.rb, line 46 def self.qualifiers [PASS, FAIL, SOFTFAIL, NEUTRAL] end
Private Class Methods
new(text, result_code)
click to toggle source
# File lib/coppertone/qualifier.rb, line 26 def initialize(text, result_code) @text = text @result_code = result_code end
Public Instance Methods
default?()
click to toggle source
# File lib/coppertone/qualifier.rb, line 31 def default? text == DEFAULT_QUALIFIER_TEXT end
to_s()
click to toggle source
# File lib/coppertone/qualifier.rb, line 35 def to_s text end