Class: Gamifier::Player
- Defined in:
- lib/gamifier/models/player.rb
Defined Under Namespace
Modules: FinderMethods
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#_id, #attributes, #destroy, #encode, #new?, #path, #payload_for_submission, #replace_if_successful, #save, #update_attributes
Methods included from Model::ClassMethods
#container, #mutable_attributes, #path, #reset!, #special_attributes, #store_or_get
Instance Method Details
#credit(verb, metadata = {}, options = {}) ⇒ Object
23 24 25 |
# File 'lib/gamifier/models/player.rb', line 23 def credit(verb, = {}, = {}) engine.activities.build(.merge({:player_id => _id, :verb => verb})).save() end |