class GoogleDrive::ListRow

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

Public Instance Methods

==(other) click to toggle source
# File lib/google_drive/list_row.rb, line 75
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_drive/list_row.rb, line 28
def [](key)
  return @list.get(@index, key)
end
[]=(key, value) click to toggle source
# File lib/google_drive/list_row.rb, line 36
def []=(key, value)
  @list.set(@index, key, value)
end
clear() click to toggle source
# File lib/google_drive/list_row.rb, line 61
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_drive/list_row.rb, line 40
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_drive/list_row.rb, line 82
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
numeric_value(key) click to toggle source
# File lib/google_drive/list_row.rb, line 32
def numeric_value(key)
  return @list.numeric_value(@index, key)
end
replace(hash) click to toggle source
# File lib/google_drive/list_row.rb, line 56
def replace(hash)
  clear()
  update(hash)
end
to_hash() click to toggle source
# File lib/google_drive/list_row.rb, line 67
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_drive/list_row.rb, line 48
def update(hash)
  for k, v in hash
    self[k] = v
  end
end
Also aliased as: merge!