Class: EmailGraph::GmailFetcher::Address
- Inherits:
-
Struct
- Object
- Struct
- EmailGraph::GmailFetcher::Address
- Defined in:
- lib/email_graph/gmail_fetcher.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(**kwargs) ⇒ Address
Returns a new instance of Address.
88 89 90 |
# File 'lib/email_graph/gmail_fetcher.rb', line 88 def initialize(**kwargs) kwargs.each{ |k, v| self[k] = v } end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email
86 87 88 |
# File 'lib/email_graph/gmail_fetcher.rb', line 86 def email @email end |
#name ⇒ Object
Returns the value of attribute name
86 87 88 |
# File 'lib/email_graph/gmail_fetcher.rb', line 86 def name @name end |
Class Method Details
.from_net_imap_address(a) ⇒ Address
94 95 96 97 |
# File 'lib/email_graph/gmail_fetcher.rb', line 94 def self.from_net_imap_address(a) new( name: a.name, email: "#{a.mailbox}@#{a.host}" ) end |