Sha256: de39c8329a3a7c039e955dc8ecbd56aa205407c716bd1d7eafbe98355bf3e2fb

Contents?: true

Size: 1018 Bytes

Versions: 6

Compression:

Stored size: 1018 Bytes

Contents

# Author::    Eric Crane  (mailto:eric.crane@mac.com)
# Copyright:: Copyright (c) 2024 Eric Crane.  All rights reserved.
#
# A helper class for Web Methods.
# 

module Gloo
  module WebSvr
    class WebMethod

      GET = 'GET'.freeze
      POST = 'POST'.freeze
      PUT = 'PUT'.freeze
      DELETE = 'DELETE'.freeze
      PATCH = 'PATCH'.freeze

      # 
      # Is the method a GET?
      # 
      def self.is_get?( method )
        return method.upcase == GET
      end

      # 
      # Is the method a POST?
      # 
      def self.is_post?( method )
        return method.upcase == POST
      end

      # 
      # Is the method a PUT?
      # 
      def self.is_put?( method )
        return method.upcase == PUT
      end

      # 
      # Is the method a PATCH?
      # 
      def self.is_patch?( method )
        return method.upcase == PATCH
      end

      # 
      # Is the method a DELETE?
      # 
      def self.is_delete?( method )
        return method.upcase == DELETE
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gloo-3.6.0 lib/gloo/web_svr/web_method.rb
gloo-3.5.0 lib/gloo/web_svr/web_method.rb
gloo-3.4.1 lib/gloo/web_svr/web_method.rb
gloo-3.4.0 lib/gloo/web_svr/web_method.rb
gloo-3.3.0 lib/gloo/web_svr/web_method.rb
gloo-3.2.0 lib/gloo/web_svr/web_method.rb