lib/rescuetime/collection.rb
def format(format)
      # Guard: fail if the passed format isn't on the whitelist
      format = format.to_s
      formatters.all.include?(format) || raise(Errors::InvalidFormatError)

      @format = format
      self
    end
def format(format)
      # Guard: fail if the passed format isn't on the whitelist
      format = format.to_s
      formatters.all.include?(format) || raise(Errors::InvalidFormatError)

      @format = format
      self
    end
def format ( format ) # Guard: fail if the passed format isn't on the whitelist format = format . to_s formatters . all . include? ( format ) || raise ( Errors :: InvalidFormatError ) @format = format self end
Sets the report format to a valid type

 @param  [#to_s] format  desired report format (one of 'array' or 'csv')
 @return [Rescuetime::Collection]

 TODO: make chainable to the client
Sets the report format to a valid type