Sha256: a1fefb977c376e4e612301cf5d3ad61cdaf830b828371b72790edb650a29e075
Contents?: true
Size: 579 Bytes
Versions: 24
Compression:
Stored size: 579 Bytes
Contents
module Datapimp::DataSync def self.sync_google_spreadsheet(options, *args) require 'google_drive' unless defined?(::GoogleDrive) raise 'Must setup google client' unless Datapimp::Sync.google.spreadsheets key = args.shift name = args.shift || "Spreadsheet" raise 'Must supply a spreadsheet key' unless key spreadsheet = Datapimp::Sources::GoogleSpreadsheet.new(name, key: key) if options.output Pathname(options.output).open("w+") do |fh| fh.write(spreadsheet.to_s) end else puts spreadsheet.to_s end end end
Version data entries
24 entries across 24 versions & 1 rubygems