reactive_support 0.1.3.beta → 0.1.3.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/reactive_support/core_ext/object/blank.rb +13 -0
- data/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: 603609fc550e2e3282984a2dbbc193d6c6c4ebb1
|
4
|
+
data.tar.gz: 622aa5e7ec4d21b51b7f1e4bac87c038577a5d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d3d0c1bac92201597b553074c200000333a53b1a48e8bb32b75c7233bdd3166109cc3ca4dd4b771dc4db8a2f7b40b17b8303bf129eaa5d74d0974822aa5781
|
7
|
+
data.tar.gz: 418935b71536d600905f9a53dc300ba755e9afc3b1b65869dcbd97d242261f9f501f926c4beae2a397c01c2da76f9ce1f07415cadbc54c9b376a0aacd652e260
|
@@ -2,6 +2,19 @@
|
|
2
2
|
# The +#blank?+ method returns +true+ if the object is undefined, blank, false,
|
3
3
|
# empty, or nil. The +#present?+ method returns the opposite of +#blank?+
|
4
4
|
|
5
|
+
class Object
|
6
|
+
|
7
|
+
# In general, +#blank?+ returns true if the receiving object is false, empty,
|
8
|
+
# or a whitespace string. This simplifies
|
9
|
+
# address.nil? || address.empty?
|
10
|
+
# to
|
11
|
+
# address.blank?
|
12
|
+
|
13
|
+
def blank?
|
14
|
+
respond_to? :empty? ? !!empty? : !self
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
5
18
|
# Ruby's core String class. See documentation for version
|
6
19
|
# 2.1.3[http://ruby-doc.org/core-2.1.3/String.html],
|
7
20
|
# 2.0.0[http://ruby-doc.org/core-2.1.3/String.html], or
|
data/version.rb
CHANGED