Class: Jsapi::Meta::OpenAPI::Contact

Inherits:
Base
  • Object
show all
Defined in:
lib/jsapi/meta/openapi/contact.rb

Overview

Represents a contact object.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #reference?, #resolve

Methods included from Attributes::ClassMethods

#attribute, #attribute_names

Constructor Details

This class inherits a constructor from Jsapi::Meta::Base

Instance Method Details

#emailObject

:attr: email The email address of the contact.



11
# File 'lib/jsapi/meta/openapi/contact.rb', line 11

attribute :email, String

#nameObject

:attr: name The name of the contact.



16
# File 'lib/jsapi/meta/openapi/contact.rb', line 16

attribute :name, String

#to_openapiObject

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

#urlObject

:attr: url The URL of the contact.



21
# File 'lib/jsapi/meta/openapi/contact.rb', line 21

attribute :url, String