Sha256: c6f2853fa76da632dcd4daec2b01542e69b0569875fd35bbfd6fbbbabcf16511

Contents?: true

Size: 481 Bytes

Versions: 28

Compression:

Stored size: 481 Bytes

Contents

module Skylight
  module Normalizers
    module Grape
      class FormatResponse < Normalizer
        register "format_response.grape"

        CAT = "view.grape.format_response".freeze

        def normalize(_trace, _name, payload)
          if (formatter = payload[:formatter])
            title = formatter.is_a?(Module) ? formatter.to_s : formatter.class.to_s
            [CAT, title, nil]
          else
            :skip
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
skylight-6.1.0.beta lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.4 lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.3 lib/skylight/normalizers/grape/format_response.rb
skylight-5.3.5 lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.2 lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.1 lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.0 lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.0.beta2 lib/skylight/normalizers/grape/format_response.rb
skylight-6.0.0.beta lib/skylight/normalizers/grape/format_response.rb
skylight-5.3.4 lib/skylight/normalizers/grape/format_response.rb
skylight-5.3.3 lib/skylight/normalizers/grape/format_response.rb
skylight-5.3.2 lib/skylight/normalizers/grape/format_response.rb
skylight-5.3.1 lib/skylight/normalizers/grape/format_response.rb
skylight-5.3.0 lib/skylight/normalizers/grape/format_response.rb
skylight-5.2.0 lib/skylight/normalizers/grape/format_response.rb
skylight-5.2.0.beta2 lib/skylight/normalizers/grape/format_response.rb
skylight-5.2.0.beta lib/skylight/normalizers/grape/format_response.rb
skylight-5.1.1 lib/skylight/normalizers/grape/format_response.rb
skylight-5.1.0.beta3 lib/skylight/normalizers/grape/format_response.rb
skylight-5.1.0.beta2 lib/skylight/normalizers/grape/format_response.rb