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.
12
13
14
|
# File 'lib/simple_segment/client.rb', line 12
def initialize(options = {})
@config = Configuration.new(options)
end
|
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
10
11
12
|
# File 'lib/simple_segment/client.rb', line 10
def config
@config
end
|
Instance Method Details
#alias(options) ⇒ Object
71
72
73
|
# File 'lib/simple_segment/client.rb', line 71
def alias(options)
Operations::Alias.new(self, symbolize_keys(options)).call
end
|
#batch {|batch| ... } ⇒ Object
84
85
86
87
88
|
# File 'lib/simple_segment/client.rb', line 84
def batch
batch = Batch.new(self)
yield(batch)
batch.commit
end
|
#flush ⇒ Object
A no op, added for backwards compatibility with ‘analytics-ruby`
91
|
# File 'lib/simple_segment/client.rb', line 91
def flush; end
|
#group(options) ⇒ Object
59
60
61
|
# File 'lib/simple_segment/client.rb', line 59
def group(options)
Operations::Group.new(self, symbolize_keys(options)).call
end
|
#identify(options) ⇒ Object
23
24
25
|
# File 'lib/simple_segment/client.rb', line 23
def identify(options)
Operations::Identify.new(self, symbolize_keys(options)).call
end
|
#page(options) ⇒ Object
47
48
49
|
# File 'lib/simple_segment/client.rb', line 47
def page(options)
Operations::Page.new(self, symbolize_keys(options)).call
end
|
#track(options) ⇒ Object
35
36
37
|
# File 'lib/simple_segment/client.rb', line 35
def track(options)
Operations::Track.new(self, symbolize_keys(options)).call
end
|