Class: Mail::Matchers::AttachmentMimeTypeMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/mail/matchers/attachment_matchers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mime_type) ⇒ AttachmentMimeTypeMatcher

Returns a new instance of AttachmentMimeTypeMatcher.


35
36
37
# File 'lib/mail/matchers/attachment_matchers.rb', line 35

def initialize(mime_type)
  @mime_type = mime_type
end

Instance Attribute Details

#mime_typeObject (readonly)

Returns the value of attribute mime_type


34
35
36
# File 'lib/mail/matchers/attachment_matchers.rb', line 34

def mime_type
  @mime_type
end

Instance Method Details

#===(other) ⇒ Object


39
40
41
# File 'lib/mail/matchers/attachment_matchers.rb', line 39

def ===(other)
  other.attachment? && other.mime_type == mime_type
end