Class: ActiveUsage::Adapters::Http
- Defined in:
- lib/active_usage/adapters/http.rb
Defined Under Namespace
Classes: Client
Instance Method Summary collapse
- #clear! ⇒ Object
-
#initialize(url, api_key) ⇒ Http
constructor
A new instance of Http.
- #record(events) ⇒ Object
- #shutdown! ⇒ Object
Constructor Details
#initialize(url, api_key) ⇒ Http
Returns a new instance of Http.
42 43 44 45 |
# File 'lib/active_usage/adapters/http.rb', line 42 def initialize(url, api_key) @url = url @api_key = api_key end |
Instance Method Details
#clear! ⇒ Object
53 |
# File 'lib/active_usage/adapters/http.rb', line 53 def clear!; end |
#record(events) ⇒ Object
47 48 49 50 51 |
# File 'lib/active_usage/adapters/http.rb', line 47 def record(events) return true if events.empty? Client.new(@url, @api_key, events).call end |
#shutdown! ⇒ Object
55 |
# File 'lib/active_usage/adapters/http.rb', line 55 def shutdown!; end |