Class: Spikard::LicenseInfo

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

Overview

License information for OpenAPI documentation.

Examples:

license = LicenseInfo.new(
  name: 'MIT',
  url: 'https://opensource.org/licenses/MIT'
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, url: nil) ⇒ LicenseInfo

Returns a new instance of LicenseInfo.

Parameters:

  • name (String)

    License name (e.g., “MIT”, “Apache 2.0”)

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

    URL to the full license text



170
171
172
173
# File 'lib/spikard/config.rb', line 170

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



166
167
168
# File 'lib/spikard/config.rb', line 166

def name
  @name
end

#urlObject

Returns the value of attribute url.



166
167
168
# File 'lib/spikard/config.rb', line 166

def url
  @url
end