コード例 #1
0
ファイル: users.py プロジェクト: rahulraj/web_projects
  def __init__(self, database_service):
    """
    Create a Users object.

    Args:
      database_service the service object that talks to the database.
    """
    assign_injectables(self, locals())
コード例 #2
0
ファイル: gameengine.py プロジェクト: rahulraj/web_projects
  def __init__(self, database_service, player_id):
    """
    Constructor for GameEngines

    Args:
      database_service the database that this depends on.
      player_id the ID of the current player.
    """
    assign_injectables(self, locals())
コード例 #3
0
  def __init__(self, connection, database):
    """
    Constructor for DatabaseService

    Args:
      connection the connection to use.
      database the database cursor to use.
    """
    assign_injectables(self, locals())
コード例 #4
0
ファイル: users.py プロジェクト: rahulraj/web_projects
  def __init__(self, user_shelf):
    """
    Create a Users object.

    Args:
      user_shelf a Shelve object obtained from opening the 'users' file.
          Maps usernames to their hashed passwords.
    """
    assign_injectables(self, locals())
コード例 #5
0
ファイル: users.py プロジェクト: rahulraj/web_projects
  def __init__(self, hashed_password, salt, stickies_json):
    """
    Constructor for UserData

    Args:
      hashed_password the password after being hashed.
      salt the salt used to hash the password.
      stickies_json the JSON string  for their stickies.
    """
    assign_injectables(self, locals())
コード例 #6
0
ファイル: gamebuilder.py プロジェクト: rahulraj/web_projects
  def __init__(self, database_service):
    """
    Constructor for GameBuilders

    Args:
      database_service the service to use for persistence.
    """
    assign_injectables(self, locals())
    self.room_names_to_ids = SingleAssignmentDict()
    self.exit_names_to_ids = SingleAssignmentDict()
    self.item_names_to_ids = SingleAssignmentDict()
    self.created_by_user = None
    self.initial_room_id = None
コード例 #7
0
 def __init__(self, for_page, time_visited, id=None):
   assign_injectables(self, locals())
コード例 #8
0
 def __init__(self, created_by_user, original_url, shortened_url, id=None):
   assign_injectables(self, locals())
コード例 #9
0
 def __init__(self, username, hashed_password, salt, id=None):
   assign_injectables(self, locals())
コード例 #10
0
 def __init__(self, connection, cursor):
     assign_injectables(self, locals())
コード例 #11
0
ファイル: inject_test.py プロジェクト: rahulraj/web_projects
 def __init__(self, foo, bar):
     assign_injectables(self, locals())
コード例 #12
0
ファイル: dataaccess.py プロジェクト: rahulraj/web_projects
 def __init__(self, name, description, from_room, to_room, locked, id=None):
   assign_injectables(self, locals())
   super(Exit, self).__init__()
コード例 #13
0
ファイル: dataaccess.py プロジェクト: rahulraj/web_projects
 def __init__(self, name, description, final_room=False, id=None):
   assign_injectables(self, locals())
   super(Room, self).__init__()
コード例 #14
0
ファイル: dataaccess.py プロジェクト: rahulraj/web_projects
 def __init__(self, created_by_user, currently_in_room, id=None):
   assign_injectables(self, locals())
   super(Player, self).__init__()
コード例 #15
0
ファイル: dataaccess.py プロジェクト: rahulraj/web_projects
 def __init__(self, name, description, use_message,
     owned_by_player, in_room, locked, unlocks_exit, id=None):
   assign_injectables(self, locals())
   super(ExitUnlockingItem, self).__init__()
コード例 #16
0
ファイル: inject_test.py プロジェクト: rahulraj/Python-Utils
 def __init__(self, foo, bar):
   from inject import assign_injectables
   assign_injectables(self, locals())