Class: OasRails::Spec::Contact
- Inherits:
-
Object
- Object
- OasRails::Spec::Contact
- Includes:
- Specable
- Defined in:
- lib/oas_rails/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.
7 8 9 10 11 |
# File 'lib/oas_rails/spec/contact.rb', line 7 def initialize(**kwargs) @name = kwargs[:name] || '' @url = kwargs[:url] || '' @email = kwargs[:email] || '' end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/oas_rails/spec/contact.rb', line 5 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/oas_rails/spec/contact.rb', line 5 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/oas_rails/spec/contact.rb', line 5 def url @url end |
Instance Method Details
#oas_fields ⇒ Object
13 14 15 |
# File 'lib/oas_rails/spec/contact.rb', line 13 def oas_fields [:name, :url, :email] end |