Class: DryOpenApi::Example

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

Overview

Class Method Summary collapse

Class Method Details

.load(hash) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/dry_open_api/example.rb', line 13

def self.load(hash)
  return unless hash

  new(
    summary: hash['summary'],
    description: hash['description'],
    value: hash['value'],
    external_value: hash['externalValue']
  )
end