File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3232class EmailReplyParser
3333 VERSION = "0.4.0"
3434
35- # Splits an email body into a list of Fragments.
35+ # Public: Splits an email body into a list of Fragments.
3636 #
3737 # text - A String email body.
3838 #
@@ -41,6 +41,11 @@ def self.read(text)
4141 Email . new . read ( text )
4242 end
4343
44+ # Public: Get the text of the visible portions of the given email body.
45+ #
46+ # text - A String email body.
47+ #
48+ # Returns a String.
4449 def self . parse_reply ( text )
4550 self . read ( text ) . visible_text
4651 end
@@ -56,7 +61,9 @@ def initialize
5661 @fragments = [ ]
5762 end
5863
59-
64+ # Public: Gets the combined text of the visible fragments of the email body.
65+ #
66+ # Returns a String.
6067 def visible_text
6168 fragments . select { |f | !f . hidden? } . map { |f | f . to_s } . join ( "\n " ) . rstrip
6269 end
You can’t perform that action at this time.
0 commit comments