Class: Apiwork::Introspection::API::Info::Contact
- Inherits:
-
Object
- Object
- Apiwork::Introspection::API::Info::Contact
- Defined in:
- lib/apiwork/introspection/api/info/contact.rb
Overview
Wraps API contact information.
Instance Method Summary collapse
-
#email ⇒ String?
The contact email.
-
#initialize(dump) ⇒ Contact
constructor
A new instance of Contact.
-
#name ⇒ String?
The contact name.
-
#to_h ⇒ Hash
Converts this contact to a hash.
-
#url ⇒ String?
The contact URL.
Constructor Details
#initialize(dump) ⇒ Contact
Returns a new instance of Contact.
16 17 18 |
# File 'lib/apiwork/introspection/api/info/contact.rb', line 16 def initialize(dump) @dump = dump end |
Instance Method Details
#email ⇒ String?
The contact email.
32 33 34 |
# File 'lib/apiwork/introspection/api/info/contact.rb', line 32 def email @dump[:email] end |
#name ⇒ String?
The contact name.
24 25 26 |
# File 'lib/apiwork/introspection/api/info/contact.rb', line 24 def name @dump[:name] end |
#to_h ⇒ Hash
Converts this contact to a hash.
48 49 50 51 52 53 54 |
# File 'lib/apiwork/introspection/api/info/contact.rb', line 48 def to_h { email: email, name: name, url: url, } end |
#url ⇒ String?
The contact URL.
40 41 42 |
# File 'lib/apiwork/introspection/api/info/contact.rb', line 40 def url @dump[:url] end |