Class: GoogleSpreadsheet::Record

Inherits:
Hash
  • Object
show all
Defined in:
lib/google_spreadsheet.rb

Overview

Use GoogleSpreadsheet::Table#records to get GoogleSpreadsheet::Record objects.

Instance Method Summary collapse

Constructor Details

#initialize(session, entry) ⇒ Record

:nodoc:



496
497
498
499
500
501
# File 'lib/google_spreadsheet.rb', line 496

def initialize(session, entry) #:nodoc:
  @session = session
  for field in entry.search("gs:field")
    self[as_utf8(field["name"])] = as_utf8(field.inner_text)
  end
end

Instance Method Details

#inspectObject

:nodoc:



503
504
505
506
# File 'lib/google_spreadsheet.rb', line 503

def inspect #:nodoc:
  content = self.map(){ |k, v| "%p => %p" % [k, v] }.join(", ")
  return "\#<%p:{%s}>" % [self.class, content]
end