weak_parameters 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 487fdb7064411169290876e998a0711514aa381f
4
- data.tar.gz: 1ba63113f459198581df79d0f90437a9298945f0
3
+ metadata.gz: ca7076308dce976d81cd580461945b2a303c95f8
4
+ data.tar.gz: 998f9b6adc9057895bb3ae0fd7a41ba738d402e5
5
5
  SHA512:
6
- metadata.gz: 1b91ff714bddccc4b7e4f631c4497e28432358e81d0d5ad47c2b2f39fa293590f161523d38c771ee4477318db01b7be0b1e9dabcddaa588134530d086b0bde0a
7
- data.tar.gz: fc851acd2965b9814cb8bf7b6916ce57906ce0b1afedfd64f8de08a05d86742e96ee3de0ef5d03ec3e3496305c67d8ce5e4c5105ebf3a61aeddac89f2ccd474f
6
+ metadata.gz: 482ee541c93541de8d589cc0d633e05471a5bf5df86a55384819bf3c91a7e015c5301f38e2efa933d2ef1a0c55ef17f32c6458b3ed059960d0b639280a2fd330
7
+ data.tar.gz: 2d8e90e7a4d1905a2239720afcac27997b8d1e12aa4ba737b8e009c2857683ef902f3d7edf4364c7b7348e01d9fc625fab757571c3ad7e4f2cb8c5c1c2215c1a
@@ -17,7 +17,7 @@ module WeakParameters
17
17
  end
18
18
 
19
19
  def type
20
- :string
20
+ self.class.name.split("::").last.sub(/Validator$/, "").underscore.to_sym
21
21
  end
22
22
 
23
23
  private
@@ -1,9 +1,5 @@
1
1
  module WeakParameters
2
2
  class BooleanValidator < WeakParameters::BaseValidator
3
- def type
4
- :boolean
5
- end
6
-
7
3
  private
8
4
 
9
5
  def valid_type?
@@ -15,14 +15,10 @@ module WeakParameters
15
15
  @validators ||= []
16
16
  end
17
17
 
18
- def type
19
- self.class.name.split("::").last.sub(/Validator$/, "").underscore.to_sym
20
- end
21
-
22
18
  private
23
19
 
24
20
  def string(key, options = {})
25
- validators << WeakParameters::BaseValidator.new(params, key, options)
21
+ validators << WeakParameters::StringValidator.new(params, key, options)
26
22
  end
27
23
 
28
24
  def integer(key, options = {})
@@ -1,3 +1,3 @@
1
1
  module WeakParameters
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weak_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura