class Turn

Overview

This is a DB record representation of a request from a game for either start/move/end request.

NOTE https://imdrasil.github.io/jennifer.cr/docs/model_mapping

Defined in:

models/turn.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(values : Hash(Symbol, AttrType) | NamedTuple, new_record) #

Accepts symbol hash or named tuple, stringify it and calls constructor with string-based keys hash.


Class Method Detail

def self._context #

def self._created_at #

def self._dead #

def self._game_id #

def self._id #

def self._path #

def self._snake_id #

def self._updated_at #

def self.column_names : Array(String) #

Instance Method Detail

def context : String #

def context! #

def context=(_context : String) #

def context=(_context : AttrType) #

def context_changed? : Bool #

def context_will_change! #

def created_at : Time? #

def created_at! #

def created_at=(_created_at : Union(Time, Nil)) #

def created_at=(_created_at : String) #

def created_at=(_created_at : AttrType) #

def created_at_changed? : Bool #

def created_at_will_change! #

def dead : Bool #

def dead! #

def dead=(_dead : Bool) #

def dead=(_dead : String) #

def dead=(_dead : AttrType) #

def dead? #

def dead_changed? : Bool #

def dead_will_change! #

def destroy : Bool #
Description copied from class Jennifer::Model::Base

Deletes object from db and calls all related callbacks.

It returns true if the object was successfully deleted.

Contact.first!.destroy # => true

def game_id : String #

def game_id! #

def game_id=(_game_id : String) #

def game_id=(_game_id : AttrType) #

def game_id_changed? : Bool #

def game_id_will_change! #

def id : Int64? #

def id! #

def id=(_id : Union(Int64, Nil)) #

def id=(_id : String) #

def id=(_id : Int32) #

def id=(_id : AttrType) #

def id_changed? : Bool #

def id_will_change! #

def path : String #

def path! #

def path=(_path : String) #

def path=(_path : AttrType) #

def path_changed? : Bool #

def path_will_change! #

def snake_id : String #

def snake_id! #

def snake_id=(_snake_id : String) #

def snake_id=(_snake_id : AttrType) #

def snake_id_changed? : Bool #

def snake_id_will_change! #

def track_timestamps_on_create #

[View source]
def track_timestamps_on_update #

[View source]
def updated_at : Time? #

def updated_at! #

def updated_at=(_updated_at : Union(Time, Nil)) #

def updated_at=(_updated_at : String) #

def updated_at=(_updated_at : AttrType) #

def updated_at_changed? : Bool #

def updated_at_will_change! #