Class: RubySpamAssassin::SpamResult

Inherits:
Object
  • Object
show all
Defined in:
lib/RubySpamAssassin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#content_lengthObject

Returns the value of attribute content_length.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def content_length
  @content_length
end

#reportObject

Returns the value of attribute report.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def report
  @report
end

#response_codeObject

Returns the value of attribute response_code.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def response_code
  @response_code
end

#response_messageObject

Returns the value of attribute response_message.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def response_message
  @response_message
end

#response_versionObject

Returns the value of attribute response_version.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def response_version
  @response_version
end

#scoreObject

Returns the value of attribute score.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def score
  @score
end

#spamObject

Returns the value of attribute spam.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def spam
  @spam
end

#tagsObject

Returns the value of attribute tags.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def tags
  @tags
end

#thresholdObject

Returns the value of attribute threshold.



4
5
6
# File 'lib/RubySpamAssassin.rb', line 4

def threshold
  @threshold
end

Instance Method Details

#spam?Boolean

returns true if the message was spam, otherwise false

Returns:

  • (Boolean)


15
16
17
# File 'lib/RubySpamAssassin.rb', line 15

def spam?
  (@spam == "True" || @spam == "Yes") ? true : false
end