Class: DryOpenApi::Reference

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

Overview

Class Method Summary collapse

Instance Method Summary collapse

Methods included from EquatableAsContent

#==

Class Method Details

.load(hash) ⇒ Object



15
16
17
18
19
# File 'lib/dry_open_api/reference.rb', line 15

def self.load(hash)
  return unless hash && hash['$ref']

  new(ref: hash['$ref'])
end

Instance Method Details

#serializable_hashObject



11
12
13
# File 'lib/dry_open_api/reference.rb', line 11

def serializable_hash
  { '$ref' => ref }
end