Class: Panacea::Rails::Stats
- Inherits:
-
Object
- Object
- Panacea::Rails::Stats
- Defined in:
- lib/panacea/rails/stats.rb
Overview
Panacea::Rails::Stats
This class tracks the end users answers if they agree to.
Constant Summary collapse
- API_BASE =
Panacea’s Stats App endpoint
"https://stats.panacea.website/statistics"
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Hash with the question’s answers + ruby version + passed arguments.
Class Method Summary collapse
-
.track(params) ⇒ Object
It sends the end user’s answers to the Panacea’s Stats App.
Instance Method Summary collapse
-
#initialize(params) ⇒ Stats
constructor
Panacea::Rails::Stats initialize method.
-
#track ⇒ Object
Makes an async call to the Panacea’s Stats App.
Constructor Details
#initialize(params) ⇒ Stats
Panacea::Rails::Stats initialize method.
29 30 31 32 |
# File 'lib/panacea/rails/stats.rb', line 29 def initialize(params) @params = params track end |
Instance Attribute Details
#params ⇒ Object (readonly)
Hash with the question’s answers + ruby version + passed arguments
15 16 17 |
# File 'lib/panacea/rails/stats.rb', line 15 def params @params end |
Class Method Details
.track(params) ⇒ Object
It sends the end user’s answers to the Panacea’s Stats App.
23 24 25 |
# File 'lib/panacea/rails/stats.rb', line 23 def self.track(params) new(params) end |
Instance Method Details
#track ⇒ Object
Makes an async call to the Panacea’s Stats App.
36 37 38 |
# File 'lib/panacea/rails/stats.rb', line 36 def track request_async_post(params) end |