Hash-like object returned by GoogleSpreadsheet::List#[].
# File lib/google_spreadsheet/list_row.rb, line 71 def ==(other) return self.class == other.class && self.to_hash() == other.to_hash() end
# File lib/google_spreadsheet/list_row.rb, line 28 def [](key) return @list.get(@index, key) end
# File lib/google_spreadsheet/list_row.rb, line 32 def []=(key, value) @list.set(@index, key, value) end
# File lib/google_spreadsheet/list_row.rb, line 57 def clear() for key in @list.keys self[key] = "" end end
# File lib/google_spreadsheet/list_row.rb, line 36 def has_key?(key) return @list.keys.include?(key) end
# File lib/google_spreadsheet/list_row.rb, line 78 def inspect return "\#<%p %p>" % [self.class, to_hash()] end
# File lib/google_spreadsheet/list_row.rb, line 52 def replace(hash) clear() update(hash) end
# File lib/google_spreadsheet/list_row.rb, line 63 def to_hash() result = {} for key in @list.keys result[key] = self[key] end return result end
# File lib/google_spreadsheet/list_row.rb, line 44 def update(hash) for k, v in hash self[k] = v end end