Module: Mail::RFC2822::Address0

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

Instance Method Summary collapse

Instance Method Details

#commentsObject



2810
2811
2812
2813
2814
# File 'lib/mail/parsers/rfc2822.rb', line 2810

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

#dig_comments(comments, elements) ⇒ Object



2801
2802
2803
2804
2805
2806
2807
2808
# File 'lib/mail/parsers/rfc2822.rb', line 2801

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