Sha256: d9255e1d4d605f6dc7c23d2b09b6a66376f4bd0531d822988f9593409052627f

Contents?: true

Size: 403 Bytes

Versions: 9

Compression:

Stored size: 403 Bytes

Contents

module OpenApi
  # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#callback-object
  class Callback
    extend Forwardable

    def initialize(**hash)
      self.hash = hash.with_indifferent_access
    end

    def_delegator :hash, :[]

    def self.load(hash)
      return unless hash

      new(**hash.symbolize_keys)
    end

    private

    attr_accessor :hash
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
open_api-0.5.0 lib/open_api/callback.rb
open_api-0.4.0 lib/open_api/callback.rb
open_api-0.3.4 lib/open_api/callback.rb
open_api-0.3.3 lib/open_api/callback.rb
open_api-0.3.2 lib/open_api/callback.rb
open_api-0.3.1 lib/open_api/callback.rb
open_api-0.3.0 lib/open_api/callback.rb
open_api-0.2.0 lib/open_api/callback.rb
open_api-0.1.0 lib/open_api/callback.rb