Class: OpenapiBlocks::Configuration::ContactBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_blocks/configuration/contact_builder.rb

Overview

rubocop:disable Style/Documentation

Instance Method Summary collapse

Instance Method Details

#email(value = nil) ⇒ Object



10
11
12
# File 'lib/openapi_blocks/configuration/contact_builder.rb', line 10

def email(value = nil)
  value ? @email = value : @email
end

#name(value = nil) ⇒ Object



6
7
8
# File 'lib/openapi_blocks/configuration/contact_builder.rb', line 6

def name(value = nil)
  value ? @name = value : @name
end

#to_hObject



18
19
20
# File 'lib/openapi_blocks/configuration/contact_builder.rb', line 18

def to_h
  { name: @name, email: @email, url: @url }.compact
end

#url(value = nil) ⇒ Object



14
15
16
# File 'lib/openapi_blocks/configuration/contact_builder.rb', line 14

def url(value = nil)
  value ? @url = value : @url
end