yuba 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/yuba/service.rb +4 -0
- data/lib/yuba/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5909f5f5026e2ec31ccdab4e1689d32ed7c92145bbf1e0b23eb3204efdd2ef05
|
4
|
+
data.tar.gz: e1768f1cc2076c724d3776c3044c95f8abd4a7b3af8b5a41e130a42ceb938ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471fcd997de8b4794bf2d99e9e0830e4a92803c535026aef299556c6eeaa55e438dac8e9c338a4f3971e0eb4d59cc7ce0195fccd15488d261ac8e222e19db0e5
|
7
|
+
data.tar.gz: 14cd89a01fb65e3ca3f7270f7b3ddf1aebc5f6dedc566e13af5c0ce93721f8b2d97e137fd42782e90797fea346521140f680b3416e3ec1d8b4bf34cf803589e8
|
data/README.md
CHANGED
@@ -159,6 +159,7 @@ You have inspection methods for properties.
|
|
159
159
|
```ruby
|
160
160
|
service = CreatePostService.new(user: someuser)
|
161
161
|
service.has_property?(:user) #=> true
|
162
|
+
service.has_value?(:user) #=> true
|
162
163
|
service.has_public_property?(:user) #=> true
|
163
164
|
service.has_private_property?(:user) #=> false
|
164
165
|
service.has_required_property?(:user) #=> true
|
data/lib/yuba/service.rb
CHANGED
@@ -57,6 +57,10 @@ module Yuba
|
|
57
57
|
has_property?(property) && !_properties.dig(property.to_sym, :public)
|
58
58
|
end
|
59
59
|
|
60
|
+
def has_value?(property)
|
61
|
+
has_property?(property) && respond_to?(property, true) && !send(property).nil?
|
62
|
+
end
|
63
|
+
|
60
64
|
private
|
61
65
|
|
62
66
|
def validate_arguments(args)
|
data/lib/yuba/version.rb
CHANGED