Class: EmailSpec::Extractors::Base

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

Direct Known Subclasses

DefaultPartBody, HtmlPartBody, TextPartBody

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mail) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/email_spec/extractors.rb', line 6

def initialize(mail)
  @mail = mail
end

Instance Attribute Details

#mailObject

Returns the value of attribute mail.



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

def mail
  @mail
end

Instance Method Details

#callObject



10
11
12
# File 'lib/email_spec/extractors.rb', line 10

def call
  part_body ? HTMLEntities.new.decode(part_body) : ''
end