Class: OasCore::Spec::Contact
- Inherits:
-
Object
- Object
- OasCore::Spec::Contact
- Includes:
- Specable
- Defined in:
- lib/oas_core/spec/contact.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Contact
constructor
A new instance of Contact.
- #oas_fields ⇒ Object
Methods included from Specable
Constructor Details
#initialize(**kwargs) ⇒ Contact
Returns a new instance of Contact.
9 10 11 12 13 |
# File 'lib/oas_core/spec/contact.rb', line 9 def initialize(**kwargs) @name = kwargs[:name] || '' @url = kwargs[:url] || '' @email = kwargs[:email] || '' end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/oas_core/spec/contact.rb', line 7 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/oas_core/spec/contact.rb', line 7 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'lib/oas_core/spec/contact.rb', line 7 def url @url end |
Instance Method Details
#oas_fields ⇒ Object
15 16 17 |
# File 'lib/oas_core/spec/contact.rb', line 15 def oas_fields i[name url email] end |