Class: Gaf::Worksheet::CreateWorksheet

Inherits:
Object
  • Object
show all
Defined in:
lib/gaf/worksheet/create_worksheet.rb

Constant Summary collapse

ROWS =
["STT", "Feature Branch", "Note", "Note Release", "PR feature branch", "Ticket"]

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/gaf/worksheet/create_worksheet.rb', line 6

def create
  arr_rows
  session = GoogleDrive::Session.from_config(Gaf.config.google_application_credential)
  spreadsheet = session.spreadsheet_by_title(Gaf.config.title_worksheet)
  worksheet = spreadsheet.worksheets.first
  rows.each_with_index do |row, index |
    worksheet[1, index+1] = row
  end
  worksheet.save
end