Module: Mail::RFC2822::Address0

Defined in:
lib/mail/parsers/rfc2822.rb

Instance Method Summary collapse

Instance Method Details

#commentsObject



2672
2673
2674
2675
2676
# File 'lib/mail/parsers/rfc2822.rb', line 2672

def comments
  comments = []
  dig_comments(comments, elements)
  comments
end

#dig_comments(comments, elements) ⇒ Object



2663
2664
2665
2666
2667
2668
2669
2670
# File 'lib/mail/parsers/rfc2822.rb', line 2663

def dig_comments(comments, elements)
  elements.each { |elem|
    if elem.respond_to?(:comment)
      comments << elem.comment
    end
    dig_comments(comments, elem.elements) if elem.elements
   }
end