Class: DryOpenApi::Paths
- Inherits:
-
Object
- Object
- DryOpenApi::Paths
- Extended by:
- Forwardable
- Includes:
- EquatableAsContent
- Defined in:
- lib/dry_open_api/paths.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**path_hash) ⇒ Paths
constructor
A new instance of Paths.
- #serializable_hash ⇒ Object
Methods included from EquatableAsContent
Constructor Details
#initialize(**path_hash) ⇒ Paths
Returns a new instance of Paths.
7 8 9 |
# File 'lib/dry_open_api/paths.rb', line 7 def initialize(**path_hash) self.path_hash = path_hash.with_indifferent_access end |
Class Method Details
Instance Method Details
#serializable_hash ⇒ Object
18 19 20 |
# File 'lib/dry_open_api/paths.rb', line 18 def serializable_hash path_hash.map { |k, v| [k.to_s, v.serializable_hash] }.to_h end |