Skip to content

Commit 5511dd6

Browse files
committed
✨ Add FetchData msg-att methods and update rdoc
An accessor method has been created for every supported `msg-att` in `#attrs`. These attrs accessors also provide a place for documentation for each of the supported message attributes. With one exception, all of the methods return the value from `#attrs`, unchanged. The exception is `#internaldate`, which uses `parse_time` to return a `Time` object rather than a string. With one exception, these methods are given the same name as their `msg-att` with "." changed to "_". The exception is the "body section" attributes (`"BODY[#{section_spec}]<#offset}>"`), which has been given several methods (which all accept an `offset` keyword argument): * `#message` for `BODY[]` * `#part(1, 2, 3)` for `BODY[1.2.3]` * `#text(1, 2, 3)` for `BODY[1.2.3.TEXT]` * `#mime(1, 2, 3)` for `BODY[1.2.3.MIME]` * `#header(1, 2, 3)` for `BODY[1.2.3.HEADER]` * `#header(fields: %w[Foo Bar])` or `#header_fields("Foo", "Bar")` for `BODY[HEADER.FIELDS (Foo Bar)]` * `#header(except: %w[Foo Bar])` or `#header_fields_not("Foo", "Bar")` for `BODY[HEADER.FIELDS.NOT (Foo Bar)]`
1 parent dcfb35f commit 5511dd6

File tree

3 files changed

+590
-205
lines changed

3 files changed

+590
-205
lines changed

0 commit comments

Comments
 (0)