Sha256: 0001b7655447f65e0aabbaaec1b0b208cb5df095af62c8eb957590d853ba34e5

Contents?: true

Size: 323 Bytes

Versions: 6

Compression:

Stored size: 323 Bytes

Contents

module RestPack::Service
  module Commands
    class Get < RestPack::Service::Command
      def execute
        result = self.class.serializer_class.resource(inputs)

        if result[self.class.serializer_class.key].empty?
          status :not_found
        else
          result
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
restpack_service-0.0.83 lib/restpack_service/commands/get.rb
restpack_service-0.0.82 lib/restpack_service/commands/get.rb
restpack_service-0.0.81 lib/restpack_service/commands/get.rb
restpack_service-0.0.80 lib/restpack_service/commands/get.rb
restpack_service-0.0.79 lib/restpack_service/commands/get.rb
restpack_service-0.0.78 lib/restpack_service/commands/get.rb