Method: Analytic#initialize
- Defined in:
- app/models/analytic.rb
#initialize(settings = {}) ⇒ Analytic
Returns a new instance of Analytic.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/models/analytic.rb', line 6 def initialize(settings={}) # Merge Configurações padrões com as definidas pelo usuário @settings = { client_id: Setting.for_key("rdcms.omniauth.google.key", false), client_secret: Setting.for_key("rdcms.omniauth.google.secret", false), scope: "https://www.googleapis.com/auth/analytics.readonly", redirect_uri: "", approval_prompt: "force", response_type: "code", access_type: "offline", token_method: "post" }.merge settings @client = nil @oauth2 = nil @error = nil @token = nil end |