Class: CSVPlusPlus::Writer::GoogleSheetBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_plus_plus/writer/google_sheet_builder.rb

Overview

Given rows from a Template, build requests compatible with Google Sheets Ruby API rubocop:disable Metrics/ClassLength

Instance Method Summary collapse

Constructor Details

#initialize(current_sheet_values:, sheet_id:, rows:, column_index: 0, row_index: 0) ⇒ GoogleSheetBuilder

initialize



10
11
12
13
14
15
16
# File 'lib/csv_plus_plus/writer/google_sheet_builder.rb', line 10

def initialize(current_sheet_values:, sheet_id:, rows:, column_index: 0, row_index: 0)
  @current_sheet_values = current_sheet_values
  @sheet_id = sheet_id
  @rows = rows
  @column_index = column_index
  @row_index = row_index
end

Instance Method Details

#batch_update_spreadsheet_requestObject

Build a Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest



19
20
21
# File 'lib/csv_plus_plus/writer/google_sheet_builder.rb', line 19

def batch_update_spreadsheet_request
  build_batch_request(@rows)
end