Class: Spikard::ServerInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/spikard/config.rb

Overview

Server information for OpenAPI documentation.

Multiple servers can be specified for different environments.

Examples:

server = ServerInfo.new(
  url: 'https://api.example.com',
  description: 'Production'
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, description: nil) ⇒ ServerInfo

Returns a new instance of ServerInfo.

Parameters:

  • url (String)

    Server URL (e.g., “api.example.com”)

  • description (String, nil) (defaults to: nil)

    Description of the server (e.g., “Production”, “Staging”)



190
191
192
193
# File 'lib/spikard/config.rb', line 190

def initialize(url:, description: nil)
  @url = url
  @description = description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



186
187
188
# File 'lib/spikard/config.rb', line 186

def description
  @description
end

#urlObject

Returns the value of attribute url.



186
187
188
# File 'lib/spikard/config.rb', line 186

def url
  @url
end