module Gaf::Worksheet::LoadWorksheet

Public Instance Methods

get_first_row() click to toggle source
# File lib/gaf/worksheet/load_worksheet.rb, line 11
def get_first_row
  @hash_row_title = {}
  @worksheet.rows.first.each_with_index do |value, index|
    @hash_row_title.store(value, index + 1)
  end
end
load_worksheet() click to toggle source
# File lib/gaf/worksheet/load_worksheet.rb, line 4
def load_worksheet
  session = GoogleDrive::Session.from_config(Gaf.config.google_application_credential)
  spreadsheet = session.spreadsheet_by_title(Gaf.config.title_worksheet)
  @worksheet ||= spreadsheet.worksheets.last
  @sprint ||= Sprint.find_or_create_by name: worksheet.title
end