Class: Spfquery
- Inherits:
-
Object
- Object
- Spfquery
- Defined in:
- lib/spfquery.rb,
lib/spfquery/version.rb
Constant Summary collapse
- VERSION =
'0.1.0'
Instance Attribute Summary collapse
-
#helo ⇒ Object
readonly
Returns the value of attribute helo.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#sender ⇒ Object
readonly
Returns the value of attribute sender.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ip, sender, helo = nil) ⇒ Spfquery
constructor
A new instance of Spfquery.
- #pass? ⇒ Boolean
- #result ⇒ Object
Constructor Details
#initialize(ip, sender, helo = nil) ⇒ Spfquery
11 12 13 14 15 |
# File 'lib/spfquery.rb', line 11 def initialize(ip, sender, helo=nil) @ip = ip @sender = sender @helo = helo end |
Instance Attribute Details
#helo ⇒ Object (readonly)
Returns the value of attribute helo.
5 6 7 |
# File 'lib/spfquery.rb', line 5 def helo @helo end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
5 6 7 |
# File 'lib/spfquery.rb', line 5 def ip @ip end |
#sender ⇒ Object (readonly)
Returns the value of attribute sender.
5 6 7 |
# File 'lib/spfquery.rb', line 5 def sender @sender end |
Class Method Details
.pass?(*args) ⇒ Boolean
7 8 9 |
# File 'lib/spfquery.rb', line 7 def self.pass?(*args) new(*args).pass? end |
Instance Method Details
#pass? ⇒ Boolean
17 18 19 |
# File 'lib/spfquery.rb', line 17 def pass? 'pass' == result end |
#result ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/spfquery.rb', line 21 def result @result ||= begin if line = output.lines.first line.chomp.downcase else 'none' end end end |