Sha256: e60b93c98a8ed9a22d9daf67eb77f089dc5dcfde72e879ed981384c8c9c47c99

Contents?: true

Size: 291 Bytes

Versions: 21

Compression:

Stored size: 291 Bytes

Contents

# frozen_string_literal: true

module Grape
  module Util
    module Registrable
      def default_elements
        @default_elements ||= {}
      end

      def register(format, element)
        default_elements[format] = element unless default_elements[format]
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
grape-1.3.0 lib/grape/util/registrable.rb