Class: SimpleSegment::Client

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/simple_segment/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#symbolize_keys

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client


11
12
13
# File 'lib/simple_segment/client.rb', line 11

def initialize(options = {})
  @config = Configuration.new(options)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config


9
10
11
# File 'lib/simple_segment/client.rb', line 9

def config
  @config
end

Instance Method Details

#alias(options) ⇒ Object


70
71
72
# File 'lib/simple_segment/client.rb', line 70

def alias(options)
  Operations::Alias.new(symbolize_keys(options), config).call
end

#flushObject

A no op, added for backwards compatibility with `analytics-ruby`


75
76
# File 'lib/simple_segment/client.rb', line 75

def flush
end

#group(options) ⇒ Object


58
59
60
# File 'lib/simple_segment/client.rb', line 58

def group(options)
  Operations::Group.new(symbolize_keys(options), config).call
end

#identify(options) ⇒ Object


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

def identify(options)
  Operations::Identify.new(symbolize_keys(options), config).call
end

#page(options) ⇒ Object


46
47
48
# File 'lib/simple_segment/client.rb', line 46

def page(options)
  Operations::Page.new(symbolize_keys(options), config).call
end

#track(options) ⇒ Object


34
35
36
# File 'lib/simple_segment/client.rb', line 34

def track(options)
  Operations::Track.new(symbolize_keys(options), config).call
end