Sha256: 03a4a91c9811005207abf180d1127f66074dfadcc98bab3f184c4f0ea37d2ba1

Contents?: true

Size: 833 Bytes

Versions: 3

Compression:

Stored size: 833 Bytes

Contents

module Strutta
  # Entries belong to a Strutta::Games object
  # Instance methods found in Strutta::APIObject
  class Judging < APIObject
    # Initializes the Strutta::Entries object
    #
    # @param id [Integer, nil] Entry id
    # @param game [Strutta::Games] Master Strutta::Games object
    # @return [Strutta::Points] instantiated Strutta::Points object
    def initialize(id = nil, game)
      @id = id
      @game = game
      @root_path = 'judging'
    end

    # GET request for Judging (no ID required)
    #
    # @return [Hash] Parsed body of the API response
    def get(params = {})
      @game.verify_no_id(@id)
      @game.get(params, @root_path)
    end

    # Disbled methods
    alias_method :all, :method_disabled
    alias_method :update, :method_disabled
    alias_method :delete, :method_disabled
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
strutta-api-1.0.3.1 lib/strutta-api/judging.rb
strutta-api-1.0.2 lib/strutta-api/judging.rb
strutta-api-1.0.1 lib/strutta-api/judging.rb