tablestructured 0.0.0 → 0.1.0

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: 5c721cbf30ab9a27fb6cbf1b6bcb8dce8e683b25
4
- data.tar.gz: 16013ce5ed80daff07cd9cbdfd5d2658e6efeaa7
3
+ metadata.gz: eff8ab5fd48d7f513a36a9c62a33a97bf21266b5
4
+ data.tar.gz: 4fe70c614965faa1f76f717be42f5444ae51e348
5
5
  SHA512:
6
- metadata.gz: 44499a97eee65ef8d75f20eeca3e9b42582ec142a5fe06682a852e7f24a8b17c71d12d3750d8aed9c084d4aac0b0794376b1919b1d85e2feccc836819e420d70
7
- data.tar.gz: b01522acccd585af4059a0b31443aa1461fa4cbf2405ff48e0c18702581bd9e89ee1b7257e43ef0224307913c350eb010727e63210238f499b583595ec140043
6
+ metadata.gz: 5deb9e5b4ee608639dd5e99581dc4474738c754b98fbf69387001cd3726f3aff7e27f1b2297938ac0bcf4d248d4ef44073ab434eb0155eab836f8c6241fa928a
7
+ data.tar.gz: b1fc3aafb6777a28339b843cfdb5f3c2bf36fe8a10d012e3b65ff5dc3ec13ccdceb0e508da00a464fa17e158d8854f15515a75f667c33dde9d4ce9fddc7ee68f
@@ -1,5 +1,5 @@
1
1
  module TableStructured
2
- def self.new array, headers_up: false#, headers_left: false
2
+ def self.new array, headers: :top
3
3
  # TODO: headers_left should probably mean the ids of entries
4
4
  struct = Struct.new *array.first.map(&:to_s).map(&:to_sym).tap{ |_| fail "headers should be unique" if _.dup.uniq! }
5
5
  array.drop(1).map{ |_| struct.new *_ }
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "tablestructured"
3
- spec.version = "0.0.0"
3
+ spec.version = "0.1.0"
4
4
  spec.summary = "convert two-dimensional Array into an Array of Structs consuming the first row and/or column as attributes"
5
5
 
6
6
  spec.author = "Victor Maslov aka Nakilon"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tablestructured
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-04 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: nakilon@gmail.com