Class: Hisui::Response
- Inherits:
-
Object
- Object
- Hisui::Response
- Defined in:
- lib/hisui/response.rb,
lib/hisui/response/ga_data.rb
Defined Under Namespace
Classes: GaData
Instance Method Summary collapse
- #comparing ⇒ Object
- #comparing_total ⇒ Object
- #data? ⇒ Boolean
-
#initialize(response:, request:) ⇒ Response
constructor
A new instance of Response.
- #primary ⇒ Object
- #primary_total ⇒ Object
- #raw_attributes ⇒ Object
- #rows ⇒ Object
- #total_values ⇒ Object
Constructor Details
Instance Method Details
#comparing ⇒ Object
16 17 18 |
# File 'lib/hisui/response.rb', line 16 def comparing @comparing ||= @ga_data.construct(:second) end |
#comparing_total ⇒ Object
33 34 35 |
# File 'lib/hisui/response.rb', line 33 def comparing_total @comparing_total ||= @ga_data.sum(:second) end |
#data? ⇒ Boolean
37 38 39 |
# File 'lib/hisui/response.rb', line 37 def data? @ga_data.data? end |
#primary ⇒ Object
12 13 14 |
# File 'lib/hisui/response.rb', line 12 def primary @primary ||= @ga_data.construct(:first) end |
#primary_total ⇒ Object
29 30 31 |
# File 'lib/hisui/response.rb', line 29 def primary_total @primary_total ||= @ga_data.sum(:first) end |
#raw_attributes ⇒ Object
7 8 9 10 |
# File 'lib/hisui/response.rb', line 7 def raw_attributes warn "[DEPRECATION] `raw_attributes` is deprecated. Please use `primary` instead." primary end |
#rows ⇒ Object
20 21 22 |
# File 'lib/hisui/response.rb', line 20 def rows @rows ||= @ga_data.rows end |
#total_values ⇒ Object
24 25 26 27 |
# File 'lib/hisui/response.rb', line 24 def total_values warn "[DEPRECATION] `total_values` is deprecated. Please use `primary_total` instead." primary_total end |