Class: Jsapi::Meta::OpenAPI::Contact
- Defined in:
- lib/jsapi/meta/openapi/contact.rb
Overview
Represents a contact object.
Instance Method Summary collapse
-
#email ⇒ Object
:attr: email The email address of the contact.
-
#name ⇒ Object
:attr: name The name of the contact.
-
#to_openapi ⇒ Object
Returns a hash representing the contact object.
-
#url ⇒ Object
:attr: url The URL of the contact.
Methods inherited from Base
#initialize, #inspect, #reference?, #resolve
Methods included from Attributes::ClassMethods
Constructor Details
This class inherits a constructor from Jsapi::Meta::Base
Instance Method Details
#email ⇒ Object
:attr: email The email address of the contact.
11 |
# File 'lib/jsapi/meta/openapi/contact.rb', line 11 attribute :email, String |
#name ⇒ Object
:attr: name The name of the contact.
16 |
# File 'lib/jsapi/meta/openapi/contact.rb', line 16 attribute :name, String |
#to_openapi ⇒ Object
Returns a hash representing the contact object.
24 25 26 27 28 29 30 |
# File 'lib/jsapi/meta/openapi/contact.rb', line 24 def to_openapi(*) { name: name, url: url, email: email }.compact end |
#url ⇒ Object
:attr: url The URL of the contact.
21 |
# File 'lib/jsapi/meta/openapi/contact.rb', line 21 attribute :url, String |