org_tp 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/README.org +3 -3
- data/examples/0100_basic.rb +0 -3
- data/lib/org_tp/generator.rb +9 -9
- data/lib/org_tp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 504f184a93b870aef3d0b2bfdfe7db66531f1f5ca8e62275f7ee5d0a58b93d69
|
4
|
+
data.tar.gz: 5dbc4523729001301351c1b2c027396106ec3c26c35234f842d90e20c314a40e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a178a68a9729abea669adcec091f0d9ddb49aa87806303cc39d5680be18045c036e8de3eb492067a37c2fc8af05f7a1f6d20fb54868658f0ab767b0ba462bbae
|
7
|
+
data.tar.gz: 4348e081393642b184d83bbe0040401671feabf480e88e480770d7bdcc7dd4b5093f41a2c241b510672410a5b22de2a33cf579d8d927cbec21239f29eb1e0d92
|
data/.travis.yml
CHANGED
data/README.org
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
#+html: <a href="https://badge.fury.io/rb/org_tp"><img src="https://badge.fury.io/rb/org_tp.svg" alt="Gem Version" height="18"></a>
|
2
|
+
#+html: <a href="https://travis-ci.org/akicho8/org_tp"><img src="https://travis-ci.org/akicho8/org_tp.svg?branch=master" /></a>
|
3
|
+
#+html: <a href="https://codeclimate.com/github/akicho8/org_tp/maintainability"><img src="https://api.codeclimate.com/v1/badges/3af6a246ec61ddafd45d/maintainability" /></a>
|
4
4
|
|
5
5
|
* OrgTp
|
6
6
|
|
data/examples/0100_basic.rb
CHANGED
data/lib/org_tp/generator.rb
CHANGED
@@ -161,32 +161,32 @@ module OrgTp
|
|
161
161
|
|
162
162
|
# Array of Hash
|
163
163
|
{
|
164
|
-
_case: -> e { e.kind_of?(Array) && e.all? { |
|
164
|
+
_case: -> e { e.kind_of?(Array) && e.all? { |v| v.kind_of?(Hash) } },
|
165
165
|
header: true,
|
166
166
|
process: -> e { e },
|
167
167
|
},
|
168
168
|
|
169
169
|
# Array excluding Hash
|
170
170
|
{
|
171
|
-
_case: -> e { e.kind_of?(Array) && e.none? { |
|
171
|
+
_case: -> e { e.kind_of?(Array) && e.none? { |v| v.kind_of?(Hash) } },
|
172
172
|
header: false,
|
173
173
|
process: -> e {
|
174
|
-
e.collect do |
|
175
|
-
{'(array_element)' =>
|
174
|
+
e.collect do |v|
|
175
|
+
{'(array_element)' => v}
|
176
176
|
end
|
177
177
|
},
|
178
178
|
},
|
179
179
|
|
180
180
|
# Array containing Hash and others
|
181
181
|
{
|
182
|
-
_case: -> e { e.kind_of?(Array) && e.any? { |
|
182
|
+
_case: -> e { e.kind_of?(Array) && e.any? { |v| !v.kind_of?(Hash) } },
|
183
183
|
header: true,
|
184
184
|
process: -> e {
|
185
|
-
e.collect do |
|
186
|
-
if
|
187
|
-
|
185
|
+
e.collect do |v|
|
186
|
+
if v.kind_of? Hash
|
187
|
+
v
|
188
188
|
else
|
189
|
-
{'(array_element)' =>
|
189
|
+
{'(array_element)' => v}
|
190
190
|
end
|
191
191
|
end
|
192
192
|
},
|
data/lib/org_tp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: org_tp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akicho8
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|