to_dots 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +1 -1
- data/lib/to_dots/version.rb +1 -1
- data/lib/to_dots.rb +4 -5
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ed6c85e7adc7219b143c21f03779747ea25391e450aff15c63b4dacdeb09e574
|
4
|
+
data.tar.gz: a4aa785461ea26e642fdabb6ba5ae28762ba39b4cedd78ea77ebe434d45712a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9a7e1c2d8f1da1ce08e0ed56fccfcf728e756e35a3d264fdf5d5a3765580e56844962b639c6823435a3eb6caf1f5190d8eb6a47de2d626f430d044d20dbf19b
|
7
|
+
data.tar.gz: 76c4942055c1b28f3389ab2646beda8eb09485c81521dbad41268d2d93639be63ac36f704105b4ebd8807e84eaad12e932dab218306b39bc78f1692d598dc1e7
|
data/Gemfile.lock
CHANGED
data/lib/to_dots/version.rb
CHANGED
data/lib/to_dots.rb
CHANGED
@@ -4,14 +4,13 @@ require_relative './array'
|
|
4
4
|
|
5
5
|
module ToDots
|
6
6
|
def self.to_dots(object, result = [], prefix = '')
|
7
|
-
|
8
|
-
when ::Hash
|
7
|
+
if object.respond_to?(:to_hash)
|
9
8
|
object.each do |key, value|
|
10
9
|
to_dots(value, result, "#{prefix}#{'.' unless prefix.empty?}#{key}")
|
11
10
|
end
|
12
|
-
|
13
|
-
object.
|
14
|
-
to_dots(value, result,
|
11
|
+
elsif object.is_a?(Array)
|
12
|
+
object.each do |value|
|
13
|
+
to_dots(value, result, prefix.to_s)
|
15
14
|
end
|
16
15
|
else
|
17
16
|
result << "#{prefix}.#{object}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: to_dots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Fowler
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,7 +79,7 @@ homepage: http://github.com/fzf/to_dots
|
|
79
79
|
licenses:
|
80
80
|
- MIT
|
81
81
|
metadata: {}
|
82
|
-
post_install_message:
|
82
|
+
post_install_message:
|
83
83
|
rdoc_options: []
|
84
84
|
require_paths:
|
85
85
|
- lib
|
@@ -94,9 +94,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
|
98
|
-
|
99
|
-
signing_key:
|
97
|
+
rubygems_version: 3.1.2
|
98
|
+
signing_key:
|
100
99
|
specification_version: 4
|
101
100
|
summary: Converts a Hash or Array into dot strings
|
102
101
|
test_files: []
|