Sha256: fe46962a1eaa7c480e2d44f3b739babd247383801bd3e6bee82d2c0b23024383

Contents?: true

Size: 925 Bytes

Versions: 4

Compression:

Stored size: 925 Bytes

Contents

require 'dashx/version'
require 'dashx/config'
require 'dashx/client'

module DashX
  @clients = {}

  def self.configure(client_name = :default)
    yield config = DashX::Config.new

    @clients[client_name] = DashX::Client.new(config)
  end

  def self.deliver(urn, parcel)
    @clients[:default].deliver(urn, parcel)
  end

  def self.identify(uid, options)
    @clients[:default].identify(uid, options)
  end

  def self.track(event, uid, data)
    @clients[:default].track(event, uid, data)
  end

  def self.save_contacts(uid, contacts)
    @clients[:default].save_contacts(uid, contacts)
  end

  def self.fetch_item(identifier)
    @clients[:default].fetch_item(identifier)
  end

  def self.fetch_stored_preferences(uid)
    @clients[:default].fetch_stored_preferences(uid)
  end

  def self.save_stored_preferences(uid, preferenceData)
    @clients[:default].save_stored_preferences(uid, preferenceData)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dashx-0.9.0 lib/dashx.rb
dashx-0.8.0 lib/dashx.rb
dashx-0.7.0 lib/dashx.rb
dashx-0.6.0 lib/dashx.rb