class Tablespoon::Doc
Attributes
doc[R]
session[R]
Public Class Methods
new( key, opts = {} )
click to toggle source
# File lib/tablespoon.rb, line 11 def initialize( key, opts = {} ) if opts[:username] && opts [:password] @session = GoogleDrive.login( opts[:username], opts[:password] ) @doc = session.spreadsheet_by_key( key ) else raise "No username and password" end end
Public Instance Methods
get_table( x, opts = {} )
click to toggle source
# File lib/tablespoon.rb, line 20 def get_table( x, opts = {} ) if x.class == String return Table.new @doc.worksheet_by_title( x ), opts else return Table.new @doc.worksheets[x], opts end end