lite-ruby 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/docs/HASH.md +2 -2
- data/lib/.DS_Store +0 -0
- data/lib/lite/.DS_Store +0 -0
- data/lib/lite/ruby/hash.rb +7 -2
- data/lib/lite/ruby/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93073011b0520a73b4b0d3311415cbcff582a92c7c88f8146b21c41a2b02ef94
|
4
|
+
data.tar.gz: 9f5c1cd0080c616f7a84deb2dcfb3bbcc69057e50e50b96bc114e7d99a003b0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14aad2c4f73c63f34b66e34bd2a050186b5b88161a5a4cb117f341a07d20bb788b88d9311dbfdf65cceaa6d2fbb94a46a90dbb78ce94c19d7e24ac5d00f90353
|
7
|
+
data.tar.gz: cf1e8c7390dc377b7c7ba7827b1e3da4c759778b262d5fa47a839e6a71a87583d1fc74adc7c5e413e6815eae2e5872508b3a16655f044be7b799c5cf25397c9f
|
data/.DS_Store
ADDED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.0.11] - 2019-08-15
|
10
|
+
### Changed
|
11
|
+
- Renamed hash alias to aka
|
12
|
+
- Changed how hash slice! works
|
13
|
+
|
9
14
|
## [1.0.10] - 2019-08-15
|
10
15
|
### Changed
|
11
16
|
- Add modulize to camelize
|
data/Gemfile.lock
CHANGED
data/docs/HASH.md
CHANGED
@@ -8,13 +8,13 @@ Creates a new hash from two separate arrays.
|
|
8
8
|
Hash.zip(%i[a b c], [1, 2, 3]) #=> { a: 1, b: 2, c: 3 }
|
9
9
|
```
|
10
10
|
|
11
|
-
`
|
11
|
+
`aka`
|
12
12
|
------
|
13
13
|
Adds a key/value pair from an existing key/value pair.
|
14
14
|
|
15
15
|
```ruby
|
16
16
|
h1 = { foo: 'bar', baz: 'boo' }
|
17
|
-
h1.
|
17
|
+
h1.aka('boo', :foo)
|
18
18
|
|
19
19
|
h1['boo'] #=> 'bar'
|
20
20
|
```
|
data/lib/.DS_Store
ADDED
Binary file
|
data/lib/lite/.DS_Store
CHANGED
Binary file
|
data/lib/lite/ruby/hash.rb
CHANGED
@@ -10,7 +10,7 @@ class Hash
|
|
10
10
|
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def aka(new_key, old_key)
|
14
14
|
self[new_key] = self[old_key] if key?(old_key)
|
15
15
|
self
|
16
16
|
end
|
@@ -319,7 +319,12 @@ class Hash
|
|
319
319
|
end
|
320
320
|
|
321
321
|
def slice!(*keys)
|
322
|
-
|
322
|
+
omit = slice(*self.keys - keys)
|
323
|
+
hash = slice(*keys)
|
324
|
+
hash.default = default
|
325
|
+
hash.default_proc = default_proc if default_proc
|
326
|
+
replace(hash)
|
327
|
+
omit
|
323
328
|
end
|
324
329
|
|
325
330
|
alias only slice
|
data/lib/lite/ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
@@ -129,6 +129,7 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
+
- ".DS_Store"
|
132
133
|
- ".fasterer.yml"
|
133
134
|
- ".gitignore"
|
134
135
|
- ".rspec"
|
@@ -158,6 +159,7 @@ files:
|
|
158
159
|
- docs/STRING.md
|
159
160
|
- docs/STRUCT.md
|
160
161
|
- docs/TIME.md
|
162
|
+
- lib/.DS_Store
|
161
163
|
- lib/generators/lite/ruby/install_generator.rb
|
162
164
|
- lib/generators/lite/ruby/templates/install.rb
|
163
165
|
- lib/lite/.DS_Store
|