Class: SimpleSegment::Client
- Inherits:
-
Object
- Object
- SimpleSegment::Client
show all
- Includes:
- Utils
- Defined in:
- lib/simple_segment/client.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Utils
included, #isoify_dates, #isoify_dates!, #maybe_datetime_in_iso8601, #symbolize_keys
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
14
15
16
|
# File 'lib/simple_segment/client.rb', line 14
def initialize(options = {})
@config = Configuration.new(options)
end
|
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
12
13
14
|
# File 'lib/simple_segment/client.rb', line 12
def config
@config
end
|
Instance Method Details
#alias(options) ⇒ Object
78
79
80
|
# File 'lib/simple_segment/client.rb', line 78
def alias(options)
Operations::Alias.new(self, symbolize_keys(options)).call
end
|
#batch {|batch| ... } ⇒ Object
91
92
93
94
95
|
# File 'lib/simple_segment/client.rb', line 91
def batch
batch = Batch.new(self)
yield(batch)
batch.commit
end
|
#flush ⇒ Object
A no op, added for backwards compatibility with ‘analytics-ruby`
98
|
# File 'lib/simple_segment/client.rb', line 98
def flush; end
|
#group(options) ⇒ Object
65
66
67
|
# File 'lib/simple_segment/client.rb', line 65
def group(options)
Operations::Group.new(self, symbolize_keys(options)).call
end
|
#identify(options) ⇒ Object
26
27
28
|
# File 'lib/simple_segment/client.rb', line 26
def identify(options)
Operations::Identify.new(self, symbolize_keys(options)).call
end
|
#page(options) ⇒ Object
52
53
54
|
# File 'lib/simple_segment/client.rb', line 52
def page(options)
Operations::Page.new(self, symbolize_keys(options)).call
end
|
#track(options) ⇒ Object
39
40
41
|
# File 'lib/simple_segment/client.rb', line 39
def track(options)
Operations::Track.new(self, symbolize_keys(options)).call
end
|