class Scribesend::ListObject

Public Instance Methods

[](k) click to toggle source
Calls superclass method
# File lib/scribesend/list_object.rb, line 3
def [](k)
  case k
  when String, Symbol
    super
  else
    raise ArgumentError.new("You tried to access the #{k.inspect} index, but ListObject types only support String keys. (HINT: List calls return an object with a 'data' (which is the data array). You likely want to call #data[#{k.inspect}])")
  end
end
each(&blk) click to toggle source
# File lib/scribesend/list_object.rb, line 12
def each(&blk)
  self.data.each(&blk)
end