Class: PlayerBLL
- Inherits:
-
Object
- Object
- PlayerBLL
- Defined in:
- lib/rubypitaya/app-template/app/bll/player_bll.rb
Instance Method Summary collapse
Instance Method Details
#create_new_player(setup, config) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/rubypitaya/app-template/app/bll/player_bll.rb', line 3 def create_new_player(setup, config) name = config['initial_player'][:name] gold = config['initial_player'][:wallet][:gold] player = Player.new(name: name, gold: gold, user: User.new) player.save! player end |