grape-swagger/spec/support/empty_model_parser.rb

24 lines
414 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# rubocop:disable Lint/EmptyClass
2016-05-12 04:54:01 +08:00
class EmptyClass
end
# rubocop:enable Lint/EmptyClass
2016-05-12 04:54:01 +08:00
module GrapeSwagger
class EmptyModelParser
attr_reader :model, :endpoint
2016-05-12 04:54:01 +08:00
def initialize(model, endpoint)
@model = model
@endpoint = endpoint
end
def call
{}
end
end
end
GrapeSwagger.model_parsers.register(GrapeSwagger::EmptyModelParser, EmptyClass)