Class: Mail::Matchers::AttachmentFilenameMatcher

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ AttachmentFilenameMatcher

Returns a new instance of AttachmentFilenameMatcher.


24
25
26
# File 'lib/mail/matchers/attachment_matchers.rb', line 24

def initialize(filename)
  @filename = filename
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename


23
24
25
# File 'lib/mail/matchers/attachment_matchers.rb', line 23

def filename
  @filename
end

Instance Method Details

#===(other) ⇒ Object


28
29
30
# File 'lib/mail/matchers/attachment_matchers.rb', line 28

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