Class: PeopleGroup::Connectors::GoogleSheets

Inherits:
Object
  • Object
show all
Defined in:
lib/peoplegroup/connectors/google_sheets.rb

Instance Method Summary collapse

Instance Method Details

#spreadsheet(title) ⇒ Object



8
9
10
# File 'lib/peoplegroup/connectors/google_sheets.rb', line 8

def spreadsheet(title)
  retry_on_error { session.spreadsheet_by_title(title) }
end

#worksheet(spreadsheet_title, worksheet_title) ⇒ Object



12
13
14
15
# File 'lib/peoplegroup/connectors/google_sheets.rb', line 12

def worksheet(spreadsheet_title, worksheet_title)
  worksheets = retry_on_error { spreadsheet(spreadsheet_title).worksheets }
  worksheets.find { |worksheet| worksheet.title == worksheet_title }
end