class Strutta::Flow

Flow belongs to a Strutta::Games object Other Instance methods found in Strutta::APIObject

Public Class Methods

new(id = nil, game) click to toggle source

Initializes the Strutta::Flow object

@param game [Strutta::Games] Master Strutta::Games object @return [Strutta::Flow] instantiated Strutta::Flow object

# File lib/strutta-api/flow.rb, line 9
def initialize(id = nil, game)
  @id = id
  @game = game
  @root_path = 'flow'
end

Public Instance Methods

delete() click to toggle source

DELETE request for Flow (no ID required)

@return [Hash] Parsed body of the API response

# File lib/strutta-api/flow.rb, line 26
def delete
  @game.verify_no_id(@id)
  @game.delete(@root_path)
end
get() click to toggle source

GET request for Flow (no ID required)

@return [Hash] Parsed body of the API response

# File lib/strutta-api/flow.rb, line 18
def get
  @game.verify_no_id(@id)
  @game.get({}, @root_path)
end