Skip to content

Commit ec22aee

Browse files
committed
some better tomdoc
1 parent 9b661ea commit ec22aee

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/email_reply_parser.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
class 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

0 commit comments

Comments
 (0)