class Gaf::Worksheet::CreateWorksheet
Constants
- ROWS
Attributes
array_main_branchs[RW]
rows[RW]
Public Instance Methods
create()
click to toggle source
# 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
Private Instance Methods
arr_rows()
click to toggle source
# File lib/gaf/worksheet/create_worksheet.rb, line 20 def arr_rows @rows = ROWS @array_main_branchs = Gaf.config.array_main_branchs array_main_branchs.each do |main_branch| need_rows = ["pr_merge_#{main_branch}", "merged_#{main_branch}", "deployed_#{main_branch}"] rows << need_rows end rows.flatten! end