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-2.1.3 lib/grape/util/registrable.rb
grape-2.1.2 lib/grape/util/registrable.rb
grape-2.1.1 lib/grape/util/registrable.rb
grape-2.1.0 lib/grape/util/registrable.rb
grape-2.0.0 lib/grape/util/registrable.rb
grape-1.8.0 lib/grape/util/registrable.rb
grape-1.7.1 lib/grape/util/registrable.rb
grape-1.7.0 lib/grape/util/registrable.rb
grape-1.6.2 lib/grape/util/registrable.rb
grape-1.6.1 lib/grape/util/registrable.rb
grape-1.6.0 lib/grape/util/registrable.rb
grape-1.5.3 lib/grape/util/registrable.rb
grape-1.5.2 lib/grape/util/registrable.rb
grape-1.5.1 lib/grape/util/registrable.rb
grape-1.5.0 lib/grape/util/registrable.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.4.0/lib/grape/util/registrable.rb
grape-1.4.0 lib/grape/util/registrable.rb
grape-1.3.3 lib/grape/util/registrable.rb
grape-1.3.2 lib/grape/util/registrable.rb
grape-1.3.1 lib/grape/util/registrable.rb