Class: SearchConsoleApi::Objects::QueryResponseRow
- Inherits:
-
Object
- Object
- SearchConsoleApi::Objects::QueryResponseRow
- Defined in:
- lib/search_console_api/objects/query_response_row.rb
Instance Attribute Summary collapse
-
#clicks ⇒ Object
Returns the value of attribute clicks.
-
#country ⇒ Object
Returns the value of attribute country.
-
#ctr ⇒ Object
Returns the value of attribute ctr.
-
#date ⇒ Object
Returns the value of attribute date.
-
#device ⇒ Object
Returns the value of attribute device.
-
#impressions ⇒ Object
Returns the value of attribute impressions.
-
#keys ⇒ Object
Returns the value of attribute keys.
-
#page ⇒ Object
Returns the value of attribute page.
-
#position ⇒ Object
Returns the value of attribute position.
-
#query ⇒ Object
Returns the value of attribute query.
-
#search_appearance ⇒ Object
Returns the value of attribute search_appearance.
Instance Method Summary collapse
-
#initialize(attributes = {}, dimensions = []) ⇒ QueryResponseRow
constructor
A new instance of QueryResponseRow.
Constructor Details
#initialize(attributes = {}, dimensions = []) ⇒ QueryResponseRow
Returns a new instance of QueryResponseRow.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 7 def initialize(attributes = {}, dimensions = []) @keys = attributes["keys"] @clicks = attributes["clicks"] @impressions = attributes["impressions"] @ctr = attributes["ctr"] @position = attributes["position"] dimensions.each_with_index do |dimension, index| instance_variable_set("@#{dimension}", @keys[index]) end end |
Instance Attribute Details
#clicks ⇒ Object
Returns the value of attribute clicks.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def clicks @clicks end |
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def country @country end |
#ctr ⇒ Object
Returns the value of attribute ctr.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def ctr @ctr end |
#date ⇒ Object
Returns the value of attribute date.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def date @date end |
#device ⇒ Object
Returns the value of attribute device.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def device @device end |
#impressions ⇒ Object
Returns the value of attribute impressions.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def impressions @impressions end |
#keys ⇒ Object
Returns the value of attribute keys.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def keys @keys end |
#page ⇒ Object
Returns the value of attribute page.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def page @page end |
#position ⇒ Object
Returns the value of attribute position.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def position @position end |
#query ⇒ Object
Returns the value of attribute query.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def query @query end |
#search_appearance ⇒ Object
Returns the value of attribute search_appearance.
4 5 6 |
# File 'lib/search_console_api/objects/query_response_row.rb', line 4 def search_appearance @search_appearance end |