Sha256: 664691e46a108718e10d5c21b33cfdfc70c19f2c51c7a5b70c98351d6e2decfc
Contents?: true
Size: 779 Bytes
Versions: 20
Compression:
Stored size: 779 Bytes
Contents
# Add Ruport (http://rubyreports.org/) support to the RallyRestAPI. # This will add a method, #to_table, to QueryResult # # For example: # table = rally_api.find(:defect) { equal :state, "Open" }.to_table([:formatted_i_d, :name, :owner]) # table.to_pdf # # Ruport can deal with anything that has a #to_hash class RestObject def to_hash # :nodoc elements end end class QueryResult # return a Ruport::Data::Table. Takes an array of columns for the report # defects = rally.find(:defect, :fetch => true) { equal :state, "Open } # table = defects.to_table([:name, :severity, :priority, :owner]) # table.to_pdf def to_table(columns = []) table = Ruport::Data::Table.new(:column_names => columns) self.each { |i| table << i } table end end
Version data entries
20 entries across 20 versions & 1 rubygems