axlsx_report 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d64193ccc54ae3e17a45d75e45c1e9b8eb43f1f
4
- data.tar.gz: 1a3d7d7eddab702c1a27bef38b40ee2b13c1eb00
3
+ metadata.gz: c280100376262e4f650b7057c773cc99d11ac6b5
4
+ data.tar.gz: ba45f8119fcf8f496d61c213426cc6e1e538e869
5
5
  SHA512:
6
- metadata.gz: ccf0c61fa1c9e43bb834c282dc51109f1eb861bef6410e9a3ee91d7c3b022b7bb89267c2b3b99cdbec3778a46f5acce748a99d5d12bec3a50664cdb518dd7796
7
- data.tar.gz: af269d9121fdde9179b7bcc74d5b0000b3205caaadd38d9409058dffd19c56cc84d9bff09dfbef8c0c1617fdd6d2c41c37b08887d0ba39417f8fe8a4c4137ba7
6
+ metadata.gz: dd521331de96830ce6095f8dcedfa7b57275825944d04262ff0ce851570c6b0b8bd26801804138701d49ab6e6107548314a481eff0107b083832a1a2946240c3
7
+ data.tar.gz: 7e6b0ef54416cec34496222a34804e6f9f48c5bd8be014838c65536b5dee8f0b8e4e125459ac1dbfa0c05f11535ddd6196021d77459b55f32a90f28e43e1a797
@@ -0,0 +1,16 @@
1
+ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
2
+
3
+ require 'axlsx_report'
4
+
5
+ class TotalsReport < AxlsxReport::Base
6
+ column 'Integer', ->(i) { i }, total: 'Total'
7
+ column 'Square', ->(i) { i * i }, total: :sum
8
+ end
9
+
10
+ if __FILE__ == $0
11
+ report = TotalsReport.new
12
+ (1..10).each { |i| report << i }
13
+ report.save('totals_report.xlsx')
14
+ end
15
+
16
+
@@ -301,7 +301,7 @@ module AxlsxReport
301
301
 
302
302
  def total_actions
303
303
  @total_actions ||=
304
- columns.map(&:options).each do |ops|
304
+ columns.map(&:options).map do |ops|
305
305
  ops[:total]
306
306
  end
307
307
  end
@@ -1,3 +1,3 @@
1
1
  module AxlsxReport
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axlsx_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Volochnev
@@ -104,6 +104,7 @@ files:
104
104
  - examples/base_report.rb
105
105
  - examples/group_report.rb
106
106
  - examples/lambda_report.rb
107
+ - examples/totals_report.rb
107
108
  - examples/width_report.rb
108
109
  - lib/axlsx_report.rb
109
110
  - lib/axlsx_report/base.rb