rubyexcel 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubyexcel/sheet.rb +13 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e33af53bc3f51434f755feea7e7e4ed88a546835
4
- data.tar.gz: afc4d1c1c5e5dd8c69d87305a041708f27d46071
3
+ metadata.gz: 936bd8860beb086b6066d2221d910730e6b1c7d6
4
+ data.tar.gz: be5e2a1ed1f5c2fea3229621ee92bc650aab6db2
5
5
  SHA512:
6
- metadata.gz: 81eaa6abc692eb99c86f1fb2a35554b361dc1f2d2dff487c20bcf7f67878ecbc5044a82edb41251d46967551c42c71e4a4e2ac54c6b0505efe9475521a80cf5f
7
- data.tar.gz: e565b35e6946964f1414e76cc2e08c3f83d719349184bf268ac69392e68d71c14695f1890dd060988601e185e91a9515ab889d4e215d66104edb9ea3293cfa0d
6
+ metadata.gz: 09f390f15338d999b1611890cf83afc7edc5c1e17b684b8406f26d19ef6d8ebb1d23509098eeb584fb8ea07fba38ae05ae37dd827454d039c3003c4ba40f7bdd
7
+ data.tar.gz: 92209b9dd520c03d3785a7090ae1a887985606fd9146772e3cad71edee663ed965000fa1de60d5df78dc0ab2c05cd61ef3a3eb46df7890c7ee9978c8791e7ca8
@@ -571,7 +571,7 @@ module RubyExcel
571
571
  end
572
572
 
573
573
  #
574
- # Summarise the values of a Column into a Hash
574
+ # Return a Hash containing the Column values and the number of times each appears.
575
575
  #
576
576
  # @param [String] header the header of the Column to summarise
577
577
  # @return [Hash]
@@ -580,6 +580,18 @@ module RubyExcel
580
580
  def summarise( header )
581
581
  ch( header ).summarise
582
582
  end
583
+ alias summarize summarise
584
+
585
+ #
586
+ # Overwrite the sheet with the Summary of a Column
587
+ #
588
+ # @param [String] header the header of the Column to summarise
589
+ #
590
+
591
+ def summarise!( header )
592
+ load( summarise( header ).to_a.unshift [ header, 'Count' ] )
593
+ end
594
+ alias summarize! summarise!
583
595
 
584
596
  #
585
597
  # The Sheet as a 2D Array
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyexcel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Pearson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-10 00:00:00.000000000 Z
11
+ date: 2013-09-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A tabular data structure in Ruby, with header-based helper methods for
14
14
  analysis and editing, and some of Excel's API style. Can output as 2D Array, HTML,