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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 017f6300c8cb0d9867119b0e186af6d285b385abec945a23f7745648e140d709
4
- data.tar.gz: 5c67a6522565be8935e10413298640755037ed516d30105a53bb1d1bfbf30da7
3
+ metadata.gz: 5909f5f5026e2ec31ccdab4e1689d32ed7c92145bbf1e0b23eb3204efdd2ef05
4
+ data.tar.gz: e1768f1cc2076c724d3776c3044c95f8abd4a7b3af8b5a41e130a42ceb938ec8
5
5
  SHA512:
6
- metadata.gz: 34d21d868256f97cf550ff18a6adb20c6ed2a46c923979ef933966c13b79503835b9db16c4df86c7cb327506dcf240c72e437bc9541e9f8548d086e6dfa58e09
7
- data.tar.gz: 14579a01e26e0916eb2a199ed0fc182d6902130b9ad5e9cacf35700bfd1f085d0ab4d8652bbf71bedfdd108ac97d13a43f2c71ac315c07c5acd82fb9eb466e5b
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
@@ -1,3 +1,3 @@
1
1
  module Yuba
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yuba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - willnet