embrace 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/embrace/brackets.rb +3 -3
- data/lib/embrace/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44b84935504ec153e647b337c9e3ad22ac86cc6f
|
4
|
+
data.tar.gz: baf85efaea3fef4d0c82d30bf3eccde326646c80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df626da34b508b36edc08e04df42192ae7015c859be88b750d253d20afb3e9ea2c847973a18b70d1fa60c154bfad53bc1b433b3dad7cd783a622a92924fe1592
|
7
|
+
data.tar.gz: 3ac6958161038ebb0c243afe2da1078b00802fcca410fea506a3b4a1048a23f9520d4a2e0fc07cdddf92fb3be334ac439d3c5b788f1b857534a137e3bd0ca7f7
|
data/README.md
CHANGED
@@ -123,7 +123,6 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/johnca
|
|
123
123
|
intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
|
124
124
|
[Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
125
125
|
|
126
|
-
|
127
126
|
## License
|
128
127
|
|
129
128
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/embrace/brackets.rb
CHANGED
@@ -22,18 +22,18 @@ module Embrace
|
|
22
22
|
alias_method :to_a, :to_ary
|
23
23
|
|
24
24
|
def inspect
|
25
|
-
to_a.inspect
|
25
|
+
"#<Brackets style=#{to_a.join('').inspect}>"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
module_function
|
30
30
|
|
31
31
|
def Brackets(style_or_opening, *closing)
|
32
|
-
return Brackets.new(style_or_opening
|
32
|
+
return Brackets.new(style_or_opening, *closing) unless closing.empty?
|
33
33
|
|
34
34
|
case style_or_opening
|
35
35
|
when Brackets then style_or_opening
|
36
|
-
when Array then Brackets(*style_or_opening)
|
36
|
+
when Array then Brackets.new(*style_or_opening)
|
37
37
|
else
|
38
38
|
Brackets.from_str(style_or_opening.to_s)
|
39
39
|
end
|
data/lib/embrace/version.rb
CHANGED