rubyexcel 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubyexcel/sheet.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 936bd8860beb086b6066d2221d910730e6b1c7d6
|
4
|
+
data.tar.gz: be5e2a1ed1f5c2fea3229621ee92bc650aab6db2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09f390f15338d999b1611890cf83afc7edc5c1e17b684b8406f26d19ef6d8ebb1d23509098eeb584fb8ea07fba38ae05ae37dd827454d039c3003c4ba40f7bdd
|
7
|
+
data.tar.gz: 92209b9dd520c03d3785a7090ae1a887985606fd9146772e3cad71edee663ed965000fa1de60d5df78dc0ab2c05cd61ef3a3eb46df7890c7ee9978c8791e7ca8
|
data/lib/rubyexcel/sheet.rb
CHANGED
@@ -571,7 +571,7 @@ module RubyExcel
|
|
571
571
|
end
|
572
572
|
|
573
573
|
#
|
574
|
-
#
|
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.
|
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-
|
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,
|