Class: DryOpenApi::Server

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Includes:
EquatableAsContent
Defined in:
lib/dry_open_api/server.rb

Overview

Class Method Summary collapse

Methods included from EquatableAsContent

#==

Class Method Details

.load(hash) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/dry_open_api/server.rb', line 13

def self.load(hash)
  new(
    url: hash['url'],
    description: hash['description'],
    variables: hash['variables']&.map { |h| ServerVariable.load(h) }
  )
end