class Adjust::Core::Tokens

Attributes

app[R]
config[R]
event[R]

Public Class Methods

new(app, event, config) click to toggle source
# File lib/adjust/core/tokens.rb, line 4
def initialize(app, event, config)
  @app = app.to_s
  @event = event.to_s
  @config = config[@app]
end

Public Instance Methods

find() click to toggle source
# File lib/adjust/core/tokens.rb, line 10
def find
  { app_token: app_token, event_token: event_token }
end

Private Instance Methods

app_token() click to toggle source
# File lib/adjust/core/tokens.rb, line 18
def app_token
  return app unless config

  config.fetch('app_token') { app }
end
event_token() click to toggle source
# File lib/adjust/core/tokens.rb, line 24
def event_token
  return event unless config

  if config.include?(event)
    config[event].fetch('event_token') { event }
  else
    event
  end
end