Class: Strutta::Rounds

Inherits:
APIObject show all
Defined in:
lib/strutta-api/rounds.rb

Overview

Rounds belong to a Strutta::Games object Instance methods found in Strutta::APIObject

Instance Attribute Summary

Attributes inherited from APIObject

#game

Instance Method Summary collapse

Methods inherited from APIObject

#all, #create, #delete, #get, #method_disabled, #update

Constructor Details

#initialize(id = nil, game) ⇒ Strutta::Rounds

Initializes the Strutta::Rounds object

Parameters:

  • id (Integer, nil) (defaults to: nil)

    Entry id

  • game (Strutta::Games)

    Master Strutta::Games object



10
11
12
13
14
15
# File 'lib/strutta-api/rounds.rb', line 10

def initialize(id = nil, game)
  @id = id
  @game = game
  @root_path = "rounds/#{@id}"
  @no_id_error = Errors::ROUND_ID_REQUIRED
end