class GoogleSpreadsheet::ListRow

Hash-like object returned by GoogleSpreadsheet::List#[].

Public Instance Methods

==(other) click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 71
def ==(other)
  return self.class == other.class && self.to_hash() == other.to_hash()
end
Also aliased as: ===, eql?
===(other) click to toggle source
Alias for: ==
[](key) click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 28
def [](key)
  return @list.get(@index, key)
end
[]=(key, value) click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 32
def []=(key, value)
  @list.set(@index, key, value)
end
clear() click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 57
def clear()
  for key in @list.keys
    self[key] = ""
  end
end
eql?(other) click to toggle source
Alias for: ==
has_key?(key) click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 36
def has_key?(key)
  return @list.keys.include?(key)
end
Also aliased as: include?, key?, member?
include?(key) click to toggle source
Alias for: has_key?
inspect() click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 78
def inspect
  return "\#<%p %p>" % [self.class, to_hash()]
end
key?(key) click to toggle source
Alias for: has_key?
member?(key) click to toggle source
Alias for: has_key?
merge!(hash) click to toggle source
Alias for: update
replace(hash) click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 52
def replace(hash)
  clear()
  update(hash)
end
to_hash() click to toggle source
# 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
update(hash) click to toggle source
# File lib/google_spreadsheet/list_row.rb, line 44
def update(hash)
  for k, v in hash
    self[k] = v
  end
end
Also aliased as: merge!