Class: Courrier::Email::Providers::Inbox::Email
- Inherits:
-
Object
- Object
- Courrier::Email::Providers::Inbox::Email
- Defined in:
- lib/courrier/email/providers/inbox.rb
Defined Under Namespace
Classes: Metadata
Class Method Summary collapse
Class Method Details
.from_file(path) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/courrier/email/providers/inbox.rb', line 68 def self.from_file(path) content = File.read(path) json = content[/<!--\s*(.*?)\s*-->/m, 1] = JSON.parse(json, symbolize_names: true) new( path: path, filename: File.basename(path), metadata: Metadata.new(**) ) end |