Sha256: f622c177141f89c41831cdad22e4d0bf3c80d9ccdca465565906d05a50a32efd

Contents?: true

Size: 706 Bytes

Versions: 15

Compression:

Stored size: 706 Bytes

Contents

module Skylight
  module Normalizers
    module Grape
      class Endpoint < Normalizer
        %w(run
            render
            run_filters).each do |type|
          require "skylight/normalizers/grape/endpoint_#{type}"
        end

        private

          def get_method(endpoint)
            method = endpoint.options[:method].first
            method << "..." if endpoint.options[:method].length > 1
            method
          end

          def get_path(endpoint)
            endpoint.options[:path].join("/")
          end

          def get_namespace(endpoint)
            ::Grape::Namespace.joined_space(endpoint.namespace_stackable(:namespace))
          end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
skylight-0.10.4 lib/skylight/normalizers/grape/endpoint.rb
skylight-1.0.0.beta4 lib/skylight/normalizers/grape/endpoint.rb
skylight-1.0.0.beta3 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.10.3 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.10.2 lib/skylight/normalizers/grape/endpoint.rb
skylight-1.0.0.beta2 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.10.0 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.9.4 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.9.3 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.9.2 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.9.1 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.9.0 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.8.1 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.8.0 lib/skylight/normalizers/grape/endpoint.rb
skylight-0.8.0.beta.3 lib/skylight/normalizers/grape/endpoint.rb