goodsheet 0.2.1 → 0.2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 176ca490a132450e22497d73f364833ab25d20b2
4
- data.tar.gz: adae5acdbcd029f8568633694f9461735978b4ab
3
+ metadata.gz: 4c5b7ba40c72803a5496d2c8138e45c0d12b48e0
4
+ data.tar.gz: 2fe40921757862d1c4e1920bb88f91716d4294cf
5
5
  SHA512:
6
- metadata.gz: f94f54370420e381699a918c4ac19fab8842296a5c1dbfde3851f7906ef5d760f22f528525feef61a4ade1eec51eeb16399cf0fd0a2a2aac7a9ef2dfc4fd0d2d
7
- data.tar.gz: 404ce30742bf7d5745b45e37515f8fc6a74f4a4f44a394ca3466166f806552dfc60e1e36f650918f13a8a053f12d3bf5a5b271e8cef93327fb6c7bf64721db14
6
+ metadata.gz: 823e26db17139b66e83446d6ad5df5b527bd743cebedf68d87e78039738d7f217ff06226c7992fc2239682e7d7395d37dba3ecb0cdc67d8264db7ce30b3c665f
7
+ data.tar.gz: a2e4a6b75ccf0d84fdb243e5c47c795ecdcc171186d8d0f8ab8b93d19dd19982b9f5bc4351f5b35b5b6a508aa2192de64ce4c39008672d26256644e2dfa2c153
data/README.md CHANGED
@@ -33,7 +33,7 @@ res = ss.read do
33
33
  end
34
34
 
35
35
  res.valid? # => true
36
- res.values # => {:a => [1.0, 1.0, 1.4], :b => []}
36
+ res.values # => {:a => [1.0, 1.0, 1.4], :b => [0.0, 3.7, 10.9]}
37
37
  ```
38
38
 
39
39
  By default:
@@ -42,9 +42,24 @@ By default:
42
42
 
43
43
  Pass your validation rules into the block passed to the read method, together with the column_names method that define the position (or index) and the name of the columns you want to read.
44
44
 
45
- ### Advanced usage
45
+ ### More information on usage
46
46
 
47
- to do
47
+ You can select the desired sheet by index (starting from zero) or by name:
48
+ ```ruby
49
+ ss = Goodsheet::Spreadsheet.new("my_data.xlsx")
50
+ ss.sheet(2) # select the third sheet
51
+ ss.sheet("holydays")
52
+ ss.sheets # get the sheet names array
53
+ ```
54
+ Get the
55
+
56
+
57
+ ```ruby
58
+
59
+
60
+ ```
61
+
62
+ The +read+ method include the +validate+ method, that can be invoke
48
63
 
49
64
 
50
65
 
@@ -5,6 +5,10 @@ module Goodsheet
5
5
  class Spreadsheet < Roo::Spreadsheet
6
6
  attr_reader :time_zone, :skip, :header_row, :max_errors, :row_limit
7
7
 
8
+ # Initialize a Goodsheet object
9
+ #
10
+ # @param filename [String] the spreadsheet filename you want to read
11
+ # @param [String] filename the spreadsheet filename you want to read
8
12
  # Valid options:
9
13
  # :skip : number of rows to skip (default: 1)
10
14
  # :header_row : header's row index (0 based, default: 0)
@@ -127,4 +131,3 @@ module Goodsheet
127
131
  end
128
132
  end
129
133
 
130
-
@@ -1,3 +1,3 @@
1
1
  module Goodsheet
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goodsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iwan Buetti