Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ 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)]`
- Loading branch information