Module: DashX

Defined in:
lib/dashx.rb,
lib/dashx/client.rb,
lib/dashx/config.rb,
lib/dashx/version.rb

Defined Under Namespace

Classes: Client, Config

Constant Summary collapse

VERSION =
'0.3.0'.freeze

Class Method Summary collapse

Class Method Details

.configure(client_name = :default) {|config = DashX::Config.new| ... } ⇒ Object

Yields:



8
9
10
11
12
# File 'lib/dashx.rb', line 8

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

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

.deliver(urn, parcel) ⇒ Object



14
15
16
# File 'lib/dashx.rb', line 14

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

.generate_identity_token(uid) ⇒ Object



26
27
28
# File 'lib/dashx.rb', line 26

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

.identify(uid, options) ⇒ Object



18
19
20
# File 'lib/dashx.rb', line 18

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

.save_contacts(uid, contacts) ⇒ Object



30
31
32
# File 'lib/dashx.rb', line 30

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

.track(event, uid, data) ⇒ Object



22
23
24
# File 'lib/dashx.rb', line 22

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