Class: Gamifier::Network

Inherits:
Model
  • Object
show all
Defined in:
lib/gamifier/models/network.rb

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

#engineObject

Raises:

  • (ArgumentError)


5
6
7
8
# File 'lib/gamifier/models/network.rb', line 5

def engine
  raise ArgumentError, "You must specify an enterprise key" unless Gamifier.config[:enterprise_key]
  @engine ||= Gamifier::Engine.new(:key => Gamifier.config[:enterprise_key])
end