Class: OasRails::Spec::Contact

Inherits:
Object
  • Object
show all
Includes:
Specable
Defined in:
lib/oas_rails/spec/contact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Specable

#as_json, #to_spec

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

#emailObject

Returns the value of attribute email.



5
6
7
# File 'lib/oas_rails/spec/contact.rb', line 5

def email
  @email
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/oas_rails/spec/contact.rb', line 5

def name
  @name
end

#urlObject

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_fieldsObject



13
14
15
# File 'lib/oas_rails/spec/contact.rb', line 13

def oas_fields
  [:name, :url, :email]
end