Class: MailExtract::Parser
- Inherits:
-
Object
- Object
- MailExtract::Parser
- Defined in:
- lib/mail_extract/parser.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(text, options = {}) ⇒ Parser
constructor
Initialize a new MailExtract::Parser object.
Constructor Details
#initialize(text, options = {}) ⇒ Parser
Initialize a new MailExtract::Parser object
text - Email message body options - Parsing options
Parsing options include:
:only_head - Skip the rest of the message after quote start (default: false)
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mail_extract/parser.rb', line 15 def initialize(text, ={}) @lines = [] @text = text.strip @body = "" @last_type = :text @type = :text @options = parse end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/mail_extract/parser.rb', line 5 def body @body end |