class Mail::Body
def include?(other)
body.encoding = 'base64'
body = Mail::Body.new("VGhlIGJvZHk=\n")
body.include?('The') #=> true
body = Mail::Body.new('The body')
Examples:
Accepts anything that responds to #to_s and checks if it's a substring of the decoded text
def include?(other) self.decoded.include?(other.to_s) end